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 | aedb5ce6b49afa7aca699fb94ec1eae7b43fdb4d (patch) | |
tree | df9ebd95347fb9d8425bc7f4083fdd2f3cf94162 /test | |
parent | d482ac18c5cb70a3f888f335cd9a32b196a558bc (diff) | |
download | ruby-aedb5ce6b49afa7aca699fb94ec1eae7b43fdb4d.tar.gz ruby-aedb5ce6b49afa7aca699fb94ec1eae7b43fdb4d.tar.xz ruby-aedb5ce6b49afa7aca699fb94ec1eae7b43fdb4d.zip |
* marshal.c (r_object0): entry regexp object before its encoding
name. [ruby-core:25625]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25001 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-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 172bfbb3f..a69770663 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 |