diff options
author | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-07-24 10:39:20 +0000 |
---|---|---|
committer | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-07-24 10:39:20 +0000 |
commit | b4f1675c777e497f2a5fb2c922c4710f58f84676 (patch) | |
tree | 64b74bc429a9f17d265c6800017a5cd41b998624 /test/ruby | |
parent | f06d71b5b8e3d699c1f4db5fac7e157067b01057 (diff) |
merges r28715 from trunk into ruby_1_9_2.
--
* re.c (rb_reg_expr_str): fix broken Regexp#inspect when it
is ASCII-8BIT and non-ASCII character.
The length of character should be from original byte string.
[ruby-core:31431]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@28747 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_regexp.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/ruby/test_regexp.rb b/test/ruby/test_regexp.rb index 9e850b902e..35162310db 100644 --- a/test/ruby/test_regexp.rb +++ b/test/ruby/test_regexp.rb @@ -155,8 +155,8 @@ class TestRegexp < Test::Unit::TestCase assert_equal('/\/x/i', /\/x/i.inspect) assert_equal('/\x00/i', /#{"\0"}/i.inspect) assert_equal("/\n/i", /#{"\n"}/i.inspect) - s = [0xff].pack("C") - assert_equal('/\/\xFF/i', /\/#{s}/i.inspect) + s = [0xf1, 0xf2, 0xf3].pack("C*") + assert_equal('/\/\xF1\xF2\xF3/i', /\/#{s}/i.inspect) end def test_char_to_option |