mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
strscan.c: encoding in messages
* ext/strscan/strscan.c (strscan_aref): preserve argument encoding in error messages. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
27c4fb3361
commit
4713ace44c
2 changed files with 7 additions and 10 deletions
|
@ -471,6 +471,7 @@ class TestStringScanner < Test::Unit::TestCase
|
|||
assert_equal 'foo', s['a']
|
||||
assert_equal 'bar', s['b']
|
||||
assert_raise(IndexError) { s['c'] }
|
||||
assert_raise_with_message(IndexError, /\u{30c6 30b9 30c8}/) { s["\u{30c6 30b9 30c8}"] }
|
||||
end
|
||||
|
||||
def test_pre_match
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue