Skip to content

Commit

Permalink
Fix warning about Hash construction. (#2028)
Browse files Browse the repository at this point in the history
Fixes <#2026>.

```
sinatra/test/indifferent_hash_test.rb:29: warning: Calling Hash.new with keyword arguments is deprecated and will be removed in Ruby 3.4; use Hash.new({ key: value }) instead
```
  • Loading branch information
ioquatix authored Jul 11, 2024
1 parent aa7d44a commit 4def0aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/indifferent_hash_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def test_default_block
end

def test_default_object
hash = Sinatra::IndifferentHash.new(:a=>1, ?b=>2)
hash = Sinatra::IndifferentHash.new({:a=>1, ?b=>2})
assert_equal({ :a=>1, ?b=>2 }, hash.default)
assert_equal({ :a=>1, ?b=>2 }, hash[:a])
end
Expand Down

0 comments on commit 4def0aa

Please sign in to comment.