[ruby/psych] Use assert_same
in tests where applicable
https://github.com/ruby/psych/commit/0dc25a9d6a
This commit is contained in:
parent
e6fa1d62fa
commit
b3598f95fa
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user