YUKI Hiroshi
null+****@clear*****
Fri Jun 27 15:01:32 JST 2014
YUKI Hiroshi 2014-06-27 15:01:32 +0900 (Fri, 27 Jun 2014) New Revision: c75091d62d27b476829a2ea9d9679791719fcb34 https://github.com/droonga/droonga-engine/commit/c75091d62d27b476829a2ea9d9679791719fcb34 Message: Use "if" instead of "unless" for multiple conditions Modified files: lib/droonga/forwarder.rb Modified: lib/droonga/forwarder.rb (+1 -2) =================================================================== --- lib/droonga/forwarder.rb 2014-06-27 14:21:37 +0900 (6faa65a) +++ lib/droonga/forwarder.rb 2014-06-27 15:01:32 +0900 (4b707e3) @@ -74,8 +74,7 @@ module Droonga private def output(receiver, message, command, arguments) logger.trace("output: start") - # TODO: IMPROVE ME: Should not use "unless" and "and". It is confused. - unless receiver.is_a?(String) and command.is_a?(String) + if not receiver.is_a?(String) or not command.is_a?(String)) logger.trace("output: abort: invalid argument", :receiver => receiver, :command => command) -------------- next part -------------- HTML����������������������������... Download