summaryrefslogtreecommitdiffstats
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
commit830c076186355f5c9b48201b7d3b80aeb8139cbd (patch)
treeb0d3b9b4d83e96e0e9e4afb790d7e3797d343fc8 /array.c
parentccd46e878df5d1407ba24eb870327367e5705f8f (diff)
downloadruby-830c076186355f5c9b48201b7d3b80aeb8139cbd.tar.gz
ruby-830c076186355f5c9b48201b7d3b80aeb8139cbd.tar.xz
ruby-830c076186355f5c9b48201b7d3b80aeb8139cbd.zip
* array.c (rb_ary_pop): rdoc update for new usage. [ruby-core:03022]
git-svn-id: http://svn.ruby-lang.org/repos/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 78eb15054..ccdcc3d50 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