summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--lib/minitest/unit.rb2
2 files changed, 9 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index afbe2d8b2f..7fc96e7738 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+Tue Dec 16 22:15:17 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * 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@fsij.org>
* ext/pty/pty.c (child_info): add slavename.
diff --git a/lib/minitest/unit.rb b/lib/minitest/unit.rb
index 77176240c5..cbec247d57 100644
--- a/lib/minitest/unit.rb
+++ b/lib/minitest/unit.rb
@@ -104,7 +104,7 @@ module MiniTest
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