mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
test_hash.rb: suppress warnings
* test/ruby/test_hash.rb (test_label_syntax): pass assertion message and suppress warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51431 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
987df2ece6
commit
184cf1f710
1 changed files with 3 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue