This project is closed and read-only.
Actions
Backport #4196
closedArray#flatten!(0) should return nil
Backport #4196:
Array#flatten!(0) should return nil
Status:
Closed
Assignee:
-
Description
=begin
Since Array#flatten!(0) does not modify the array I believe it should return nil. At the moment, in 1.8.7-p302, it returns itself.
irb(main):001:0> [1,[2,3,[4,5]]].flatten!(0)
=> [1, [2, 3, [4, 5]]]
Note that JRuby 1.5.6 returns nil for the above code, so either MRI is wrong or JRuby is wrong.
=end
Actions