summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-05-18 03:15:57 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-05-18 03:15:57 +0000
commit3b8b470c8e771171437961857f6b7f3b3be5334d (patch)
treec73c3d456af9154a5e21b346db01f9b519218d3a /io.c
parent8d236c317f795cb2febc538831400a7add852df7 (diff)
io.c: update ARGF examples
* io.c (argf_each_line, argf_inplace_mode_set): [DOC] Update ARGF documentation examples. `ARGF.lines` has been deprecated in favor of `ARGF.each_line`. [Fixes GH-615] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45991 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r--io.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/io.c b/io.c
index 5499086448..18a0e2cb2e 100644
--- a/io.c
+++ b/io.c
@@ -11264,7 +11264,7 @@ argf_block_call(ID mid, int argc, VALUE *argv, VALUE argf)
* For example, the following code prints out each line of each named file
* prefixed with its line number, displaying the filename once per file:
*
- * ARGF.lines do |line|
+ * ARGF.each_line do |line|
* puts ARGF.filename if ARGF.lineno == 1
* puts "#{ARGF.lineno}: #{line}"
* end
@@ -11632,7 +11632,7 @@ opt_i_get(ID id, VALUE *var)
* $ ruby argf.rb file.txt
*
* ARGF.inplace_mode = '.bak'
- * ARGF.lines do |line|
+ * ARGF.each_line do |line|
* print line.sub("foo","bar")
* end
*