diff options
author | tmm1 <tmm1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-11-27 06:03:37 +0000 |
---|---|---|
committer | tmm1 <tmm1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-11-27 06:03:37 +0000 |
commit | 53f3ddfefb4131c20baa7589d022f7ffb0859c6b (patch) | |
tree | f4e64d65cfe9490991c713bbe13a27ace84c4b10 /test/ruby | |
parent | 9c8f03fac927d153f314be4259c5b7fc9b7fedc9 (diff) | |
download | ruby-53f3ddfefb4131c20baa7589d022f7ffb0859c6b.tar.gz |
* test/ruby/test_eval.rb (class TestEval): Use assert_same instead of
assert_equal.
* test/ruby/test_hash.rb (class TestHash): ditto.
* test/ruby/test_iseq.rb (class TestISeq): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43873 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_eval.rb | 3 | ||||
-rw-r--r-- | test/ruby/test_hash.rb | 2 | ||||
-rw-r--r-- | test/ruby/test_iseq.rb | 6 |
3 files changed, 4 insertions, 7 deletions
diff --git a/test/ruby/test_eval.rb b/test/ruby/test_eval.rb index abf65613b1..2700aa33f3 100644 --- a/test/ruby/test_eval.rb +++ b/test/ruby/test_eval.rb @@ -482,7 +482,6 @@ class TestEval < Test::Unit::TestCase a, b = o.method(:foo).source_location[0], o.method(:bar).source_location[0] - assert_equal a.object_id, b.object_id, - "#{a.inspect}.object_id != #{b.inspect}.object_id" + assert_same a, b end end diff --git a/test/ruby/test_hash.rb b/test/ruby/test_hash.rb index 49b74c7257..cfb61b6480 100644 --- a/test/ruby/test_hash.rb +++ b/test/ruby/test_hash.rb @@ -212,7 +212,7 @@ class TestHash < Test::Unit::TestCase def test_ASET_string a = {"ABC" => :t} b = {"ABC" => :t} - assert_equal a.keys[0].object_id, b.keys[0].object_id + assert_same a.keys[0], b.keys[0] end def test_EQUAL # '==' diff --git a/test/ruby/test_iseq.rb b/test/ruby/test_iseq.rb index fdc223b751..0a5d9ca822 100644 --- a/test/ruby/test_iseq.rb +++ b/test/ruby/test_iseq.rb @@ -121,9 +121,7 @@ class TestISeq < Test::Unit::TestCase c = Class.new{ def foobar() end } a, b = eval("# encoding: us-ascii\n'foobar'.freeze"), - ISeq.of(c.instance_method(:foobar)).label - - assert_equal a.object_id, b.object_id, - "#{a.inspect}.object_id != #{b.inspect}.object_id" + ISeq.of(c.instance_method(:foobar)).label + assert_same a, b end end |