Added symbol & string identity tests.

This commit is contained in:
Jim Weirich
2010-09-27 11:36:38 -04:00
parent fe2ee86172
commit ece35b2539
4 changed files with 20 additions and 4 deletions

View File

@@ -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