Closed HoneyryderChuck closed 3 days ago
Tested with latest (24.0.1):
value = {"a"=>1, "b"=>2} value.to_h { |*args| puts args.inspect; args } #=> ruby 3.3 # ["a", 1] # ["b", 2] # {"a"=>1, "b"=>2} #=> truffleruby 24.0.1 [["a", 1]] <internal:core> core/enumerable.rb:327:in `block in to_h': element has wrong array length (expected 2, was 1) (ArgumentError) from <internal:core> core/enumerable.rb:389:in `block in each_with_index' from <internal:core> core/enumerable.rb:387:in `each' from <internal:core> core/enumerable.rb:387:in `each_with_index'
Thank you for the report, we'll look into it.
Fixed in b0b947eb2a14480c91ce8cbd5e6d6e28e0a14a1b.
Tested with latest (24.0.1):