diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-09-18 14:51:18 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-09-18 14:51:18 +0000 |
commit | 1aa21e630faab9d1d99f686d98e9b951c0b39488 (patch) | |
tree | df9ebd95347fb9d8425bc7f4083fdd2f3cf94162 /test/ruby/test_marshal.rb | |
parent | d36c76dc71b47b201707185b8a0b4264e83de205 (diff) | |
download | ruby-1aa21e630faab9d1d99f686d98e9b951c0b39488.tar.gz |
* marshal.c (r_object0): entry regexp object before its encoding
name. [ruby-core:25625]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25001 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_marshal.rb')
-rw-r--r-- | test/ruby/test_marshal.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/ruby/test_marshal.rb b/test/ruby/test_marshal.rb index 172bfbb3f7..a697706632 100644 --- a/test/ruby/test_marshal.rb +++ b/test/ruby/test_marshal.rb @@ -204,4 +204,12 @@ class TestMarshal < Test::Unit::TestCase a = ClassUTF8.new assert_instance_of(ClassUTF8, Marshal.load(Marshal.dump(a)), '[ruby-core:24790]') end + + def test_regexp + bug2109 = '[ruby-core:25625]' + a = "\x82\xa0".force_encoding(Encoding::Windows_31J) + b = "\x82\xa2".force_encoding(Encoding::Windows_31J) + c = [/#{a}/, /#{b}/] + assert_equal(c, Marshal.load(Marshal.dump(c))) + end end |