Kouhei Sutou
null+****@clear*****
Tue Jan 28 15:08:45 JST 2014
Kouhei Sutou 2014-01-28 15:08:45 +0900 (Tue, 28 Jan 2014) New Revision: 6a5b92dd36009748015eed7b5c90c37aa93d00a3 https://github.com/droonga/droonga-client-ruby/commit/6a5b92dd36009748015eed7b5c90c37aa93d00a3 Message: Indent Modified files: lib/droonga/client/connection/droonga_protocol.rb Modified: lib/droonga/client/connection/droonga_protocol.rb (+14 -14) =================================================================== --- lib/droonga/client/connection/droonga_protocol.rb 2014-01-28 15:08:29 +0900 (f06dfce) +++ lib/droonga/client/connection/droonga_protocol.rb 2014-01-28 15:08:45 +0900 (d3318ef) @@ -225,25 +225,25 @@ module Droonga def receive(options={}, &block) timeout = options[:timeout] catch do |tag| - loop do - start = Time.new - readable_ios, = IO.select(@read_ios, nil, nil, timeout) - break if readable_ios.nil? - if timeout - timeout -= (Time.now - start) - timeout = 0 if timeout < 0 - end + loop do + start = Time.new + readable_ios, = IO.select(@read_ios, nil, nil, timeout) + break if readable_ios.nil? + if timeout + timeout -= (Time.now - start) + timeout = 0 if timeout < 0 + end readable_ios.each do |readable_io| - on_readable(readable_io) do |object| - begin - yield(object) - rescue LocalJumpError - throw(tag) + on_readable(readable_io) do |object| + begin + yield(object) + rescue LocalJumpError + throw(tag) + end end end end end - end end private -------------- next part -------------- HTML����������������������������...Download