Server IP : 66.29.132.122 / Your IP : 3.12.162.33 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/self/root/proc/thread-self/root/proc/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: Tries to return the element at position <em>index</em>. If the index lies outside the array, the first form throws an <tt>IndexError</tt> exception, the second form returns <em>default</em>, and the third form returns the value of invoking the block, passing in the index. Negative values of <em>index</em> count from the end of the array. - !ruby/struct:SM::Flow::VERB body: " a = [ 11, 22, 33, 44 ]\n a.fetch(1) #=> 22\n a.fetch(-1) #=> 44\n a.fetch(4, 'cat') #=> "cat"\n a.fetch(4) { |i| i*i } #=> 16\n" full_name: Array#fetch is_singleton: false name: fetch params: | array.fetch(index) -> obj array.fetch(index, default ) -> obj array.fetch(index) {|index| block } -> obj visibility: public