summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-09-18 14:51:18 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-09-18 14:51:18 +0000
commit1aa21e630faab9d1d99f686d98e9b951c0b39488 (patch)
treedf9ebd95347fb9d8425bc7f4083fdd2f3cf94162 /test
parentd36c76dc71b47b201707185b8a0b4264e83de205 (diff)
* 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')
-rw-r--r--test/ruby/test_marshal.rb8
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