[Groonga-commit] droonga/drntest at cb8bd89 [master] Use "unless" instead of "if not" for readability

Back to archive index

YUKI Hiroshi null+****@clear*****
Fri Mar 20 13:01:58 JST 2015


YUKI Hiroshi	2015-03-20 13:01:58 +0900 (Fri, 20 Mar 2015)

  New Revision: cb8bd89fb4bb689cb8d3b34c7682b9008c2db109
  https://github.com/droonga/drntest/commit/cb8bd89fb4bb689cb8d3b34c7682b9008c2db109

  Message:
    Use "unless" instead of "if not" for readability

  Modified files:
    lib/drntest/response-normalizer.rb

  Modified: lib/drntest/response-normalizer.rb (+2 -1)
===================================================================
--- lib/drntest/response-normalizer.rb    2015-03-20 12:51:09 +0900 (f1338ea)
+++ lib/drntest/response-normalizer.rb    2015-03-20 13:01:58 +0900 (3268cee)
@@ -118,7 +118,8 @@ module Drntest
     end
 
     def normalize_groonga_command_body!(body)
-      return if not body.is_a?(Array) or body.empty?
+      return unless body.is_a?(Array)
+      return if body.empty?
 
       case @request["type"]
       when "table_list"
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index