mirror of
https://github.com/ruby/ruby.git
synced 2025-08-27 23:16:42 +02:00
[Bug #19924] Source code should be unsigned char stream
Use `peekc` or `nextc` to fetch the next character, instead of reading from `lex.pcur` directly, for compilers that plain char is signed.
This commit is contained in:
parent
2dca02e273
commit
17b0643392
2 changed files with 7 additions and 5 deletions
|
@ -633,6 +633,8 @@ class TestParse < Test::Unit::TestCase
|
|||
assert_syntax_error("?\\M-\x01", 'Invalid escape character syntax')
|
||||
assert_syntax_error("?\\M-\\C-\x01", 'Invalid escape character syntax')
|
||||
assert_syntax_error("?\\C-\\M-\x01", 'Invalid escape character syntax')
|
||||
|
||||
assert_equal("\xff", eval("# encoding: ascii-8bit\n""?\\\xFF"))
|
||||
end
|
||||
|
||||
def test_percent
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue