summaryrefslogtreecommitdiff
path: root/array.c
diff options
context:
space:
mode:
Diffstat (limited to 'array.c')
-rw-r--r--array.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/array.c b/array.c
index 78eb15054e..ccdcc3d506 100644
--- a/array.c
+++ b/array.c
@@ -576,9 +576,10 @@ rb_ary_pop(ary)
* Removes the last element from <i>self</i> and returns it, or
* <code>nil</code> if the array is empty.
*
- * a = [ "a", "m", "z" ]
- * a.pop #=> "z"
- * a #=> ["a", "m"]
+ * a = [ "a", "b", "c", "d" ]
+ * a.pop #=> "d"
+ * a.pop(2) #=> ["b", "c"]
+ * a #=> ["a"]
*/
static VALUE