diff --git a/test/ruby/test_hash.rb b/test/ruby/test_hash.rb index c37e072e21..076f76fe85 100644 --- a/test/ruby/test_hash.rb +++ b/test/ruby/test_hash.rb @@ -1295,10 +1295,11 @@ class TestHash < Test::Unit::TestCase feature4935 = '[ruby-core:37553] [Feature #4935]' x = 'world' - hash = assert_nothing_raised(SyntaxError) do + hash = assert_nothing_raised(SyntaxError, feature4935) do break eval(%q({foo: 1, "foo-bar": 2, "hello-#{x}": 3, 'hello-#{x}': 4, 'bar': {}})) end - assert_equal({:foo => 1, :'foo-bar' => 2, :'hello-world' => 3, :'hello-#{x}' => 4, :bar => {}}, hash) + assert_equal({:foo => 1, :'foo-bar' => 2, :'hello-world' => 3, :'hello-#{x}' => 4, :bar => {}}, hash, feature4935) + x = x end class TestSubHash < TestHash