Paren hash objects
diff --git a/test/stdlib/Kernel_test.rb b/test/stdlib/Kernel_test.rb index 0ac9b81..01071ec 100644 --- a/test/stdlib/Kernel_test.rb +++ b/test/stdlib/Kernel_test.rb
@@ -40,7 +40,7 @@ assert_send_type "([]) -> Hash[untyped, untyped]", Kernel, :Hash, [] - with_hash 'a' => 3 do |hash| + with_hash({ 'a' => 3 }) do |hash| assert_send_type "(::hash[String, Integer]) -> Hash[String, Integer]", Kernel, :Hash, hash end
diff --git a/test/stdlib/String_test.rb b/test/stdlib/String_test.rb index e6429a4..d840230 100644 --- a/test/stdlib/String_test.rb +++ b/test/stdlib/String_test.rb
@@ -103,7 +103,7 @@ '%d %d', :%, ary end - with_hash a: 3, b: 4 do |named| + with_hash({ a: 3, b: 4 }) do |named| assert_send_type '(hash[Symbol, untyped]) -> String', '%<a>d %<b>d', :%, named end @@ -953,7 +953,7 @@ 'hello', :gsub, pattern, replacement end - with_hash 'l' => ToS.new('!') do |replacement| + with_hash({ 'l' => ToS.new('!') }) do |replacement| assert_send_type '(Regexp | string, hash[String, _ToS]) -> String', 'hello', :gsub, pattern, replacement end @@ -979,7 +979,7 @@ +'heya', :gsub!, pattern, replacement end - with_hash 'l' => ToS.new('!') do |replacement| + with_hash({ 'l' => ToS.new('!') }) do |replacement| assert_send_type '(Regexp | string, hash[String, _ToS]) -> String', +'hello', :gsub!, pattern, replacement assert_send_type '(Regexp | string, hash[String, _ToS]) -> nil', @@ -1499,7 +1499,7 @@ 'hello', :sub, pattern, replacement end - with_hash 'l' => ToS.new('!') do |replacement| + with_hash({ 'l' => ToS.new('!') }) do |replacement| assert_send_type '(Regexp | string, hash[String, _ToS]) -> String', 'hello', :sub, pattern, replacement end @@ -1520,7 +1520,7 @@ 'heya', :sub!, pattern, replacement end - with_hash 'l' => ToS.new('!') do |replacement| + with_hash({ 'l' => ToS.new('!') }) do |replacement| assert_send_type '(Regexp | string, hash[String, _ToS]) -> String', 'hello', :sub!, pattern, replacement assert_send_type '(Regexp | string, hash[String, _ToS]) -> nil',