pan (Pan Pan)
- Login: pan
- Registered on: 07/04/2016
- Last sign in: 04/10/2022
Issues
| open | closed | Total | |
|---|---|---|---|
| Assigned issues | 0 | 0 | 0 |
| Reported issues | 0 | 1 | 1 |
Activity
04/10/2022
-
04:38 AM Ruby Bug #18688 (Rejected): when array's default value is empty hash adding a hash key value changes all array elements
- ```ruby
ah = Array.new(3, {})
ah[1][:foo] = 'bar'
p ah # [{:foo=>"bar"}, {:foo=>"bar"}, {:foo=>"bar"}]
```
This is not expected result. The expected result is `[{}, {:foo=>"bar"}, {}]`.
Alternatively, below code works as expecte...