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

* lib/test/unit/assertions.rb (assert_equal): show class in failure

message if meaningful.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21923 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2009-01-31 13:51:46 +00:00
parent 14605ab0ad
commit a0b15459ef
2 changed files with 9 additions and 0 deletions

View file

@ -1,3 +1,8 @@
Sat Jan 31 22:50:38 2009 Tanaka Akira <akr@fsij.org>
* lib/test/unit/assertions.rb (assert_equal): show class in failure
message if meaningful.
Sat Jan 31 22:38:46 2009 Tanaka Akira <akr@fsij.org>
* lib/resolv.rb (Resolv::DNS#each_address): don't query IPv6 address

View file

@ -69,6 +69,10 @@ module Test
elsif exp.is_a?(Time) && act.is_a?(Time)
exp_comment = " (nsec=#{exp.nsec})"
act_comment = " (nsec=#{act.nsec})"
elsif exp.class != act.class
# a subclass of Range, for example.
exp_comment = " (#{exp.class})"
act_comment = " (#{act.class})"
end
elsif !Encoding.compatible?(exp_str, act_str)
if exp.is_a?(String) && act.is_a?(String)