diff options
author | dblack <dblack@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-03-06 02:14:33 +0000 |
---|---|---|
committer | dblack <dblack@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-03-06 02:14:33 +0000 |
commit | ad5c34fa0c9410e3b22db3d09ce0da2f97421305 (patch) | |
tree | 03884c59f933245d651eab51c1fa494bced91a69 /lib | |
parent | eddd3b4158435ea494ecf749a853d47e84abe84c (diff) |
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
Diffstat (limited to 'lib')
-rw-r--r-- | lib/scanf.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/scanf.rb b/lib/scanf.rb index c4da747afe..e2f0d04c14 100644 --- a/lib/scanf.rb +++ b/lib/scanf.rb @@ -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 |