From f6b776a8b55eb97c826cd0fefc16142f469495f4 Mon Sep 17 00:00:00 2001 From: akr Date: Mon, 18 Aug 2008 15:56:38 +0000 Subject: * re.c (rb_reg_inspect): don't raise for uninitialized Regexp. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@18697 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_regexp.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/ruby') diff --git a/test/ruby/test_regexp.rb b/test/ruby/test_regexp.rb index bce362e34..ad222c548 100644 --- a/test/ruby/test_regexp.rb +++ b/test/ruby/test_regexp.rb @@ -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.allocate.inspect) assert_raise(TypeError) { Regexp.allocate.source } assert_raise(TypeError) { Regexp.allocate.casefold? } assert_raise(TypeError) { Regexp.allocate.options } -- cgit