diff options
| author | Alexander Momchilov <alexandermomchilov@gmail.com> | 2023-12-18 04:01:01 -0500 |
|---|---|---|
| committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2023-12-19 11:07:46 +0900 |
| commit | b3598f95fa997e667bb9e8003b0284ab2a4db081 (patch) | |
| tree | 877d3c04bd4f2959d915971713568457cfd6a46a | |
| parent | e6fa1d62faf6ba4b0f3277e2e92e6e60d4330cc8 (diff) | |
[ruby/psych] Use `assert_same` in tests where applicable
https://github.com/ruby/psych/commit/0dc25a9d6a
| -rw-r--r-- | test/psych/test_object_references.rb | 8 | ||||
| -rw-r--r-- | test/psych/visitors/test_to_ruby.rb | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/test/psych/test_object_references.rb b/test/psych/test_object_references.rb index 269d72242e..86bb9034b9 100644 --- a/test/psych/test_object_references.rb +++ b/test/psych/test_object_references.rb @@ -39,7 +39,7 @@ module Psych rescue Psych::DisallowedClass data = Psych.unsafe_load yml end - assert_equal data.first.object_id, data.last.object_id + assert_same data.first, data.last end def test_float_references @@ -49,7 +49,7 @@ module Psych - *name eoyml assert_equal data.first, data.last - assert_equal data.first.object_id, data.last.object_id + assert_same data.first, data.last end def test_binary_references @@ -60,7 +60,7 @@ module Psych - *name eoyml assert_equal data.first, data.last - assert_equal data.first.object_id, data.last.object_id + assert_same data.first, data.last end def test_regexp_references @@ -70,7 +70,7 @@ module Psych - *name eoyml assert_equal data.first, data.last - assert_equal data.first.object_id, data.last.object_id + assert_same data.first, data.last end end end diff --git a/test/psych/visitors/test_to_ruby.rb b/test/psych/visitors/test_to_ruby.rb index 3d4608b903..89c3676651 100644 --- a/test/psych/visitors/test_to_ruby.rb +++ b/test/psych/visitors/test_to_ruby.rb @@ -319,7 +319,7 @@ description: list = seq.to_ruby assert_equal %w{ foo foo }, list - assert_equal list[0].object_id, list[1].object_id + assert_same list[0], list[1] end def test_mapping_with_str_tag |
