Method: Array#pop
- Defined in:
- array.c
#pop ⇒ Object?
Removes the last element from self and returns it, or nil
if the array is empty.
a = [ "a", "m", "z" ]
a.pop #=> "z"
a #=> ["a", "m"]
446 447 448 |
# File 'array.c', line 446 VALUE rb_ary_pop(ary) VALUE ary; |