mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
scanf.rb: fix rescue modifier
* lib/scanf.rb (IO#scanf): fix mistaken use of rescue modifier. a patch by Mon_Ouie at [ruby-core:52813]. [Bug #7940] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44196 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
fcd7887407
commit
1e4a955435
2 changed files with 11 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
Sat Dec 14 11:55:31 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* lib/scanf.rb (IO#scanf): fix mistaken use of rescue modifier.
|
||||
a patch by Mon_Ouie at [ruby-core:52813]. [Bug #7940]
|
||||
|
||||
Sat Dec 14 11:44:52 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* util.c (ruby_qsort): fix potential stack overflow on a large
|
||||
|
|
|
@ -657,7 +657,12 @@ class IO
|
|||
break if fstr.last_spec
|
||||
fstr.prune
|
||||
end
|
||||
seek(start_position + matched_so_far, IO::SEEK_SET) rescue Errno::ESPIPE
|
||||
|
||||
begin
|
||||
seek(start_position + matched_so_far, IO::SEEK_SET)
|
||||
rescue Errno::ESPIPE
|
||||
end
|
||||
|
||||
soak_up_spaces if fstr.last_spec && fstr.space
|
||||
|
||||
return final_result
|
||||
|
|
Loading…
Reference in a new issue