mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
refixed the previous fix in IO#block_scanf
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5903 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
eddd3b4158
commit
ad5c34fa0c
1 changed files with 2 additions and 1 deletions
|
@ -659,7 +659,8 @@ class IO
|
|||
last_spec = fstr.last_spec
|
||||
begin
|
||||
current = scanf(str)
|
||||
final.push(yield(current)) unless current.empty?
|
||||
break if current.empty?
|
||||
final.push(yield(current))
|
||||
end until eof || fstr.last_spec_tried == last_spec
|
||||
return final
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue