Skip to content

Commit

Permalink
Use "if" instead of "unless" for multiple conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
piroor committed Jun 27, 2014
1 parent ccbfdbc commit c75091d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/droonga/forwarder.rb
Expand Up @@ -74,8 +74,7 @@ def resume
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)
Expand Down

0 comments on commit c75091d

Please sign in to comment.