summaryrefslogtreecommitdiffhomepage
path: root/test/t
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2019-01-06 20:59:22 +0900
committerGitHub <[email protected]>2019-01-06 20:59:22 +0900
commit89c79e56c5881831bd5c4206efa3a5e82eaf9427 (patch)
tree5c28b675ae7b596ecc6322029b6203afdac8c1d3 /test/t
parentd45a6d8363ef0d21aa43cae32edb8b3b90a0e20d (diff)
parent6f395a58d2a1f2e5fdfaf2933ee2e80d10abfd30 (diff)
downloadmruby-89c79e56c5881831bd5c4206efa3a5e82eaf9427.tar.gz
mruby-89c79e56c5881831bd5c4206efa3a5e82eaf9427.zip
Merge pull request #4216 from shuujii/add-assert_same
Add `assert_same` and `assert_not_same`
Diffstat (limited to 'test/t')
-rw-r--r--test/t/proc.rb2
-rw-r--r--test/t/string.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/test/t/proc.rb b/test/t/proc.rb
index 42ac3b941..b17b21e8c 100644
--- a/test/t/proc.rb
+++ b/test/t/proc.rb
@@ -157,7 +157,7 @@ assert('&obj call to_proc if defined') do
def mock(&b)
b
end
- assert_equal pr.object_id, mock(&pr).object_id
+ assert_same pr, mock(&pr)
assert_equal pr, mock(&pr)
obj = Object.new
diff --git a/test/t/string.rb b/test/t/string.rb
index 8f008c6a7..e0f0eb99c 100644
--- a/test/t/string.rb
+++ b/test/t/string.rb
@@ -579,7 +579,7 @@ assert('String#sub', '15.2.10.5.36') do
str = "abc"
miss = str.sub("X", "Z")
assert_equal str, miss
- assert_not_equal str.object_id, miss.object_id
+ assert_not_same str, miss
a = []
assert_equal '.abc', "abc".sub("") { |i| a << i; "." }