ruby-changes:9521
From: yugui <ko1@a...>
Date: Fri, 26 Dec 2008 14:54:30 +0900 (JST)
Subject: [ruby-changes:9521] Ruby:r21061 (ruby_1_9_1): merges r20798 and r20800 from trunk into ruby_1_9_1.
yugui 2008-12-26 14:54:09 +0900 (Fri, 26 Dec 2008) New Revision: 21061 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=21061 Log: merges r20798 and r20800 from trunk into ruby_1_9_1. * lib/minitest/unit.rb (MiniTest::Assertions#assert_instance_of): should assert by instance_of?, not ===. [ruby-dev:37458] Modified files: branches/ruby_1_9_1/ChangeLog branches/ruby_1_9_1/lib/minitest/unit.rb Index: ruby_1_9_1/ChangeLog =================================================================== --- ruby_1_9_1/ChangeLog (revision 21060) +++ ruby_1_9_1/ChangeLog (revision 21061) @@ -1,3 +1,11 @@ +Tue Dec 16 22:15:17 2008 Yukihiro Matsumoto <matz@r...> + + * lib/minitest/unit.rb (MiniTest::Assertions#assert_instance_of): + should assert by instance_of?, not ===. [ruby-dev:37458] + + * lib/minitest/unit.rb (MiniTest::Assertions#assert_instance_of): + typo fixed. + Mon Dec 15 20:59:10 2008 Tanaka Akira <akr@f...> * ext/pty/pty.c (child_info): add slavename. Index: ruby_1_9_1/lib/minitest/unit.rb =================================================================== --- ruby_1_9_1/lib/minitest/unit.rb (revision 21060) +++ ruby_1_9_1/lib/minitest/unit.rb (revision 21061) @@ -104,7 +104,7 @@ msg = message(msg) { "Expected #{mu_pp(obj)} to be an instance of #{cls}, not #{obj.class}" } flip = (Module === obj) && ! (Module === cls) # HACK for specs obj, cls = cls, obj if flip - assert cls === obj, msg + assert obj.instance_of?(cls), msg end def assert_kind_of cls, obj, msg = nil # TODO: merge with instance_of -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/