ruby-reference-manual:1963
From: Kazuhiro NISHIYAMA <redmine@r...>
Date: Fri, 1 Jan 2010 17:53:11 +0900
Subject: [ruby-reference-manual:1963] [Bug #2544] ARGF.eofの例
Bug #2544: ARGF.eofの例 http://redmine.ruby-lang.org/issues/show/2544 起票者: Kazuhiro NISHIYAMA ステータス: Open, 優先度: Normal > n = 0 > ARGF.each_line {|line| > n += 1 > if ARGF.eof > printf("eof. %s has %d(%d) line\n", ARGF.filename, n, ARGF.lineno) > n = 0 > end > } のところはnで自分で行数を数えるのではなくARGF.file.linenoを使えばよいのではないでしょうか? ---------------------------------------- http://redmine.ruby-lang.org -- ML: ruby-reference-manual@m... 使い方: http://QuickML.com/
-> 1963 2010-01-01 09:53 [redmine@r... ] [Bug #2544] ARGF.eofの例 1964 2010-01-01 14:47 ┗[redmine@r... ] [Bug #2544](Closed) ARGF.eofの例