summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authortmm1 <tmm1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-12-08 01:52:28 +0000
committertmm1 <tmm1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-12-08 01:52:28 +0000
commit779ae78995977305aa5aec9cb5b562dcf54c22e7 (patch)
tree03cb95144e04846d686d4fc01a6a8a000b9d807d /test
parent98a74d4dd5fa9cd45121e8ebfc2f787d316e924f (diff)
hash.c: revert r43870 and add alternative parser patch for literal keys
* hash.c (hash_aset_str): revert r43870 due to performance issue [Bug #9188] [ruby-core:58730] * parse.y (assoc): convert literal string hash keys to fstrings * test/ruby/test_hash.rb (class TestHash): expand test git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44058 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_hash.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/ruby/test_hash.rb b/test/ruby/test_hash.rb
index 6aaba469db..4244b86b56 100644
--- a/test/ruby/test_hash.rb
+++ b/test/ruby/test_hash.rb
@@ -209,10 +209,11 @@ class TestHash < Test::Unit::TestCase
assert_equal(256, h[z])
end
- def test_ASET_string
+ def test_NEWHASH_fstring_key
a = {"ABC" => :t}
b = {"ABC" => :t}
assert_same a.keys[0], b.keys[0]
+ assert_same "ABC".freeze, a.keys[0]
end
def test_EQUAL # '=='