summaryrefslogtreecommitdiff
path: root/ruby.c
diff options
context:
space:
mode:
authorzzak <zzak@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-04-24 04:47:31 +0000
committerzzak <zzak@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-04-24 04:47:31 +0000
commit0b4214ad9b53c2978cbca3ac08d467f03bdabd8d (patch)
tree1a94be2e01774e96a0fd4f69b086ba5f3012de56 /ruby.c
parent360843ef752f961d66e1b835f19a5ab4af6299dc (diff)
* class.c: Example of Object#methods by @windwiny [Fixes GH-293]
* ruby.c: Document return values of Kernel #sub, #gsub, and #chop git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40432 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ruby.c')
-rw-r--r--ruby.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/ruby.c b/ruby.c
index 6b61162a8a..c1c65137af 100644
--- a/ruby.c
+++ b/ruby.c
@@ -1241,7 +1241,7 @@ uscore_get(void)
/*
* call-seq:
* sub(pattern, replacement) -> $_
- * sub(pattern) { block } -> $_
+ * sub(pattern) {|...| block } -> $_
*
* Equivalent to <code>$_.sub(<i>args</i>)</code>, except that
* <code>$_</code> will be updated if substitution occurs.
@@ -1258,11 +1258,11 @@ rb_f_sub(int argc, VALUE *argv)
/*
* call-seq:
- * gsub(pattern, replacement) -> string
- * gsub(pattern) {|...| block } -> string
+ * gsub(pattern, replacement) -> $_
+ * gsub(pattern) {|...| block } -> $_
*
* Equivalent to <code>$_.gsub...</code>, except that <code>$_</code>
- * receives the modified result.
+ * will be updated if substitution occurs.
* Available only when -p/-n command line option specified.
*
*/
@@ -1277,7 +1277,7 @@ rb_f_gsub(int argc, VALUE *argv)
/*
* call-seq:
- * chop -> string
+ * chop -> $_
*
* Equivalent to <code>($_.dup).chop!</code>, except <code>nil</code>
* is never returned. See <code>String#chop!</code>.