Server IP : 66.29.132.122 / Your IP : 3.17.183.204 Web Server : LiteSpeed System : Linux business142.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64 User : admazpex ( 531) PHP Version : 7.2.34 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /proc/self/root/proc/self/root/proc/thread-self/root/proc/thread-self/root/proc/thread-self/root/proc/thread-self/root/proc/self/root/opt/alt/ruby18/share/ri/1.8/system/Array/ |
Upload File : |
--- !ruby/object:RI::MethodDescription aliases: [] block_params: comment: - !ruby/struct:SM::Flow::P body: Returns a new array that is a one-dimensional flattening of this array (recursively). That is, for every element that is an array, extract its elements into the new array. If the optional <em>level</em> argument determines the level of recursion to flatten. - !ruby/struct:SM::Flow::VERB body: " s = [ 1, 2, 3 ] #=> [1, 2, 3]\n t = [ 4, 5, 6, [7, 8] ] #=> [4, 5, 6, [7, 8]]\n a = [ s, t, 9, 10 ] #=> [[1, 2, 3], [4, 5, 6, [7, 8]], 9, 10]\n a.flatten #=> [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]\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 -> an_array array.flatten(level) -> an_array visibility: public