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

marshaltestlib.rb: descriptive assertions

* test/ruby/marshaltestlib.rb (MarshalTestLib#test_string_ivar)
  (MarshalTestLib#test_string_subclass_cycle): use more descriptive
  assertions.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39641 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2013-03-08 15:26:05 +00:00
parent 6f59a8b4a2
commit e14095fff2

View file

@ -229,7 +229,7 @@ module MarshalTestLib
str = MyString.new(10, "b") str = MyString.new(10, "b")
str.instance_eval { @v = str } str.instance_eval { @v = str }
marshal_equal(str) { |o| marshal_equal(str) { |o|
assert_equal(o.__id__, o.instance_eval { @v }.__id__) assert_same(o, o.instance_eval { @v })
o.instance_eval { @v } o.instance_eval { @v }
} }
end end
@ -239,7 +239,7 @@ module MarshalTestLib
o.extend(Mod1) o.extend(Mod1)
str = MyString.new(o, "c") str = MyString.new(o, "c")
marshal_equal(str) { |v| marshal_equal(str) { |v|
assert(v.instance_eval { @v }.kind_of?(Mod1)) assert_kind_of(Mod1, v.instance_eval { @v })
} }
end end