summaryrefslogtreecommitdiff
path: root/array.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-06-16 12:52:59 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-06-16 12:52:59 +0000
commit1135c41a5bfece4b4db3bba472c30d31c5891fe1 (patch)
treeb0d3b9b4d83e96e0e9e4afb790d7e3797d343fc8 /array.c
parent7a28fb146ff00e995c4476beb36e7adb354910c8 (diff)
* array.c (rb_ary_pop): rdoc update for new usage. [ruby-core:03022]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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