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

* re.c (rb_reg_inspect): don't raise for uninitialized Regexp.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18697 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2008-08-18 15:56:38 +00:00
parent f9e00ba03f
commit 93ad576b05
3 changed files with 8 additions and 2 deletions

View file

@ -686,7 +686,7 @@ class TestRegexp < Test::Unit::TestCase
assert_nil(~Regexp.allocate)
assert_raise(TypeError) { Regexp.allocate.match("") }
assert_raise(TypeError) { Regexp.allocate.to_s }
assert_raise(TypeError) { Regexp.allocate.inspect }
assert_match(/^#<Regexp:.*>$/, Regexp.allocate.inspect)
assert_raise(TypeError) { Regexp.allocate.source }
assert_raise(TypeError) { Regexp.allocate.casefold? }
assert_raise(TypeError) { Regexp.allocate.options }