mirror of
https://github.com/edgecase/ruby_koans.git
synced 2026-04-21 01:03:20 -04:00
Added symbol & string identity tests.
This commit is contained in:
@@ -182,4 +182,12 @@ EOS
|
||||
words = ["Now", "is", "the", "time"]
|
||||
assert_equal __("Now is the time"), words.join(" ")
|
||||
end
|
||||
|
||||
def test_strings_are_not_unique_objects
|
||||
a = "a string"
|
||||
b = "a string"
|
||||
|
||||
assert_equal __(true), a == b
|
||||
assert_equal __(false), a.object_id == b.object_id
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user