summaryrefslogtreecommitdiffstats
path: root/test/ruby
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-11-27 02:54:20 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-11-27 02:54:20 +0000
commit10c992f436caa8110a2201d08f067273a6aa884a (patch)
tree33ceb171e04fc12775f7b4a944a7693fe7abebe0 /test/ruby
parentc6a33f0841a8aec6503241b88aa15001b1ad9b67 (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: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_9_1@25942 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-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 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