관리-도구
편집 파일: flatten%21-i.yaml
--- !ruby/object:RI::MethodDescription aliases: [] block_params: comment: - !ruby/struct:SM::Flow::P body: Flattens <em>self</em> in place. Returns <tt>nil</tt> if no modifications were made (i.e., <em>array</em> contains no subarrays.) If the optional <em>level</em> argument determines the level of recursion to flatten. - !ruby/struct:SM::Flow::VERB body: " a = [ 1, 2, [3, [4, 5] ] ]\n a.flatten! #=> [1, 2, 3, 4, 5]\n a.flatten! #=> nil\n a #=> [1, 2, 3, 4, 5]\n a = [ 1, 2, [3, [4, 5] ] ]\n a.flatten!(1) #=> [1, 2, 3, [4, 5]]\n" full_name: Array#flatten! is_singleton: false name: flatten! params: | array.flatten! -> array or nil array.flatten!(level) -> array or nil visibility: public