From 4e6bba219ec6fc9806a499d6c97cf62a20916564 Mon Sep 17 00:00:00 2001 From: akr Date: Sat, 26 Jan 2008 11:19:06 +0000 Subject: add a test for [ruby-dev:33377]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15255 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_m17n.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test/ruby') diff --git a/test/ruby/test_m17n.rb b/test/ruby/test_m17n.rb index ef2ebd8d59..db6f3b928d 100644 --- a/test/ruby/test_m17n.rb +++ b/test/ruby/test_m17n.rb @@ -1017,4 +1017,11 @@ class TestM17N < Test::Unit::TestCase assert_equal(Encoding::US_ASCII.to_s.encoding, Encoding::US_ASCII) assert_equal(Encoding::US_ASCII.inspect.encoding, Encoding::US_ASCII) end + + def test_regexp_source + s = "\xa4\xa2".force_encoding("euc-jp") + r = Regexp.new(s) + t = r.source + assert_equal(s, t, "[ruby-dev:33377] Regexp.new(#{encdump s}).source") + end end -- cgit v1.2.3