[前][次][番号順一覧][スレッド一覧]

ruby-changes:9263

From: matz <ko1@a...>
Date: Tue, 16 Dec 2008 22:52:32 +0900 (JST)
Subject: [ruby-changes:9263] Ruby:r20800 (trunk): * lib/minitest/unit.rb (MiniTest::Assertions#assert_instance_of):

matz	2008-12-16 22:52:17 +0900 (Tue, 16 Dec 2008)

  New Revision: 20800

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=20800

  Log:
    * lib/minitest/unit.rb (MiniTest::Assertions#assert_instance_of):
      typo fixed.

  Modified files:
    trunk/ChangeLog
    trunk/lib/minitest/unit.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 20799)
+++ ChangeLog	(revision 20800)
@@ -7,6 +7,9 @@
 	* 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.
+
 Tue Dec 16 21:59:29 2008  NAKAMURA Usaku  <usa@r...>
 
 	* lib/test/unit.rb (Test::Unit.setup_argv): ALT_SEPARATOR support.
Index: lib/minitest/unit.rb
===================================================================
--- lib/minitest/unit.rb	(revision 20799)
+++ lib/minitest/unit.rb	(revision 20800)
@@ -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 obj.instance_of?(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/

[前][次][番号順一覧][スレッド一覧]