Actions
Bug #4024
closedIO#readlines(0) never return
Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 1.9.3dev (2010-11-04 trunk 29690) [x86_64-darwin10.4.0]
Backport:
Description
=begin
1.9.2 および trunk で IO#readlines の引数に 0 を渡すと無限ループ状態になり処理がかえってこなくなります。
IO#each_line も同様に "" を yield し続けます。
(via http://twitter.com/#!/watson1978/status/29656929210)
readlines/each_line で limit に 0 が渡された時は例外にするのが良いのではないでしょうか。
パッチを添付します。
=end
Files
Updated by nobu (Nobuyoshi Nakada) about 14 years ago
- Status changed from Open to Closed
- % Done changed from 0 to 100
=begin
This issue was solved with changeset r29694.
Tomoyuki, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
=end
Updated by mame (Yusuke Endoh) over 2 years ago
- Related to Bug #18767: IO.foreach hangs up when passes limit=0 added
Actions
Like0
Like0Like0