Actions
Bug #1440
closedArray#flatten!(0) should return nil, not self
Description
=begin
As per doc, flatten!(0) does not make modifications and should thus return nil.
[].flatten! # ==> nil
[].flatten!(42) # ==> nil
[].flatten!(-1) # ==> nil
[].flatten!(0) # ==> []
Poor man's diff for "rb_ary_flatten_bang"
-
if (level == 0) return ary;
-
if (level == 0) return Qnil;
=end
Actions
Like0
Like0