Bug #14110
closedRuby 2.5.0.dev (from trunk) still doesn't support zero unicode codepoints
Description
Hi,
This commit - https://github.com/ruby/ruby/commit/7e8b910 - according to its commit message should allow zero unicode codepoints, i.e.
$ cat test.rb
p "\u{}"
$ ./ruby -v
ruby 2.5.0dev (2017-11-14 trunk 60757) [x86_64-darwin17]
$ ./ruby test.rb
test.rb:1: invalid Unicode escape
p "\u{}"
^
Shouldn't it be supported now? Because the test that was removed (that zero codepoints are not supported) is still passing.
Thanks.
Updated by ibylich (Ilya Bylich) over 6 years ago
ibylich (Ilya Bylich) wrote:
Hi,
This commit - https://github.com/ruby/ruby/commit/7e8b910 - according to its commit message should allow zero unicode codepoints, i.e.
$ cat test.rb p "\u{}" $ ./ruby -v ruby 2.5.0dev (2017-11-14 trunk 60757) [x86_64-darwin17] $ ./ruby test.rb test.rb:1: invalid Unicode escape p "\u{}" ^
Shouldn't it be supported now? Because the test that was removed (that zero codepoints are not supported) is still passing.
Thanks.
Sorry, I've missed that it has been already fixed in https://github.com/ruby/ruby/commit/50702d16ab5862413351520b65da820194dbf8d7.
Is it going to be backported to 2.4?
Updated by duerst (Martin Dürst) over 6 years ago
- Status changed from Open to Closed
My understanding is that bugs get backported, but features don't.
While I think allowing \u{} can be convenient in some cases, I don't think it was part of the original design, and so I would think about it as a feature.