Task: Fix Ruby Hash Default Value Behavior
Task: Fix Ruby Hash Default Value Behavior: a task in Terminal-Lego-15k (Harbor dataset). In Ruby, when using Hash.new with a mutable default value like an array ( Hash.new( ) ), unexpected behavior occurs. The same default object is shared across all keys, leading to strange mutations where…
The task
In Ruby, when using `Hash.new` with a mutable default value like an array (`Hash.new([])`), unexpected behavior occurs. The same default object is shared across all keys, leading to strange mutations where values appear to "leak" between keys.
Part of PrimeIntellect/Terminal-Lego-15k.