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

* test/ruby/test_struct.rb (test_inspect): use assert_match.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24512 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2009-08-12 06:15:30 +00:00
parent 8e8e34319b
commit c00428ed9e

View file

@ -122,7 +122,7 @@ class TestStruct < Test::Unit::TestCase
o = klass.new(1)
assert_equal("#<struct a=1>", o.inspect)
o.a = o
assert(o.inspect =~ /^#<struct a=#<struct #<.*?>:...>>$/)
assert_match(/^#<struct a=#<struct #<.*?>:...>>$/, o.inspect)
Struct.new("Foo", :a)
o = Struct::Foo.new(1)