diff options
author | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-11-27 02:54:20 +0000 |
---|---|---|
committer | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-11-27 02:54:20 +0000 |
commit | 9abf98bbe47b65dbc058b8ab752aa81ba8c7754b (patch) | |
tree | 33ceb171e04fc12775f7b4a944a7693fe7abebe0 /test | |
parent | c898839035b6fe74f8281fb918c13f856690bfde (diff) |
merges r25001 from trunk into ruby_1_9_1.
--
* marshal.c (r_object0): entry regexp object before its encoding
name. [ruby-core:25625]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@25942 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 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 |