Kouhei Sutou
null+****@clear*****
Tue Dec 17 22:48:14 JST 2013
Kouhei Sutou 2013-12-17 22:48:14 +0900 (Tue, 17 Dec 2013) New Revision: bcc909691e9200ea131f0e6ac21d441dda521d47 https://github.com/droonga/drntest/commit/bcc909691e9200ea131f0e6ac21d441dda521d47 Message: Use case when instead of is_a? Modified files: lib/drntest/test-executor.rb Modified: lib/drntest/test-executor.rb (+4 -3) =================================================================== --- lib/drntest/test-executor.rb 2013-12-17 22:46:12 +0900 (bb2776a) +++ lib/drntest/test-executor.rb 2013-12-17 22:48:14 +0900 (939e10b) @@ -34,7 +34,8 @@ module Drntest port: owner.port) do |client| requests = [] operations.each do |operation| - if operation.is_a?(Directive) + case operation + when Directive case operation.type when :enable_logging logging = true @@ -45,8 +46,7 @@ module Drntest when :disable_logging logging = false end - next - end + else if logging response = client.connection.execute(operation) actuals << normalize_response(operation, response) @@ -55,6 +55,7 @@ module Drntest :connect_timeout => 2) do end end + end end requests.each do |request| request.wait -------------- next part -------------- HTML����������������������������...Download