diff options
| author | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-12-26 05:54:09 +0000 |
|---|---|---|
| committer | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-12-26 05:54:09 +0000 |
| commit | eff4ec072e7e148f4e1c3cc0344a2182c21f490c (patch) | |
| tree | 70b51eb48e1dbd02c92a1283ffdfa2f038f5fa72 | |
| parent | 654ab7fc0c0b02ad313fdfb88d874dffac229964 (diff) | |
| download | ruby-eff4ec072e7e148f4e1c3cc0344a2182c21f490c.tar.gz ruby-eff4ec072e7e148f4e1c3cc0344a2182c21f490c.tar.xz ruby-eff4ec072e7e148f4e1c3cc0344a2182c21f490c.zip | |
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]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_9_1@21061 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | ChangeLog | 8 | ||||
| -rw-r--r-- | lib/minitest/unit.rb | 2 |
2 files changed, 9 insertions, 1 deletions
@@ -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 77176240c..cbec247d5 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 |
