diff options
Diffstat (limited to 'lib/test')
-rw-r--r-- | lib/test/unit/assertions.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/test/unit/assertions.rb b/lib/test/unit/assertions.rb index 5987d1adc7..2e9fadfe57 100644 --- a/lib/test/unit/assertions.rb +++ b/lib/test/unit/assertions.rb @@ -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) |