XylotrechusZ

XylotrechusZ Shell

: /opt/alt/ruby18/share/ri/1.8/system/Array/ [ drwxr-xr-x ]
Uname: Linux premium294.web-hosting.com 4.18.0-553.45.1.lve.el8.x86_64 #1 SMP Wed Mar 26 12:08:09 UTC 2025 x86_64
Software: LiteSpeed
PHP version: 8.1.32 [ PHP INFO ] PHP os: Linux
Server Ip: 104.21.112.1
Your Ip: 216.73.216.223
User: mjbynoyq (1574) | Group: mjbynoyq (1570)
Safe Mode: OFF
Disable Function:
NONE

name : fetch-i.yaml
--- !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)               #=&gt; 22\n   a.fetch(-1)              #=&gt; 44\n   a.fetch(4, 'cat')        #=&gt; &quot;cat&quot;\n   a.fetch(4) { |i| i*i }   #=&gt; 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
© 2025 XylotrechusZ