Index: test/ruby/test_hash.rb =================================================================== --- test/ruby/test_hash.rb (revision 32242) +++ test/ruby/test_hash.rb (working copy) @@ -917,4 +917,13 @@ assert_not_equal(h.hash, h.invert.hash, feature4262) end end + + def test_label_syntax + feature4935 = '[ruby-core:37553]' + x = 'world' + hash = {foo: 1, 'foo-bar': 2, "hello-#{x}": 3} + [[:foo, 1], [:'foo-bar', 2], [:'hello-world', 3]].each do |k, v| + assert_equal(hash[k], v) + end + end end