summaryrefslogtreecommitdiff
path: root/test/ruby/test_marshal.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_marshal.rb')
-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