1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Add parentheses to suppress a warning

This commit is contained in:
Nobuyoshi Nakada 2019-06-28 17:09:18 +09:00
parent 3dba16a5d6
commit 8ec877d183
No known key found for this signature in database
GPG key ID: 4BC7D6DF58D8DF60

View file

@ -973,10 +973,10 @@ class TestRipper::ScannerEvents < Test::Unit::TestCase
def test_invalid_char
err = nil
assert_equal ['a'], scan('ident', "\ea") {|*e| err = e}
assert_equal :compile_error, err[0]
assert_match /Invalid char/, err[1]
assert_equal "\e", err[2]
assert_equal(['a'], scan('ident', "\ea") {|*e| err = e})
assert_equal(:compile_error, err[0])
assert_match(/Invalid char/, err[1])
assert_equal("\e", err[2])
end
def test_invalid_hex_escape