1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

add a test for [ruby-dev:33377].

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15255 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2008-01-26 11:19:06 +00:00
parent 8c02164fb5
commit 4e6bba219e

View file

@ -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