method
flatten!
![Some documentation Importance_1](https://d2vfyqvduarcvs.cloudfront.net/images/importance_1.png?1349367920)
flatten!(p1 = v1)
public
Flattens self in place.
Returns nil if no modifications were made (i.e., the array contains no subarrays.)
The optional level argument determines the level of recursion to flatten.
a = [ 1, 2, [3, [4, 5] ] ] a.flatten! #=> [1, 2, 3, 4, 5] a.flatten! #=> nil a #=> [1, 2, 3, 4, 5] a = [ 1, 2, [3, [4, 5] ] ] a.flatten!(1) #=> [1, 2, 3, [4, 5]]