[Groonga-commit] droonga/drntest at db489fb [master] Split "unless" and "or"

Back to archive index

Kouhei Sutou null+****@clear*****
Fri Mar 20 12:51:09 JST 2015


Kouhei Sutou	2015-03-20 12:51:09 +0900 (Fri, 20 Mar 2015)

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

  Message:
    Split "unless" and "or"
    
    The combination is difficult to understand.

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

  Modified: lib/drntest/response-normalizer.rb (+4 -2)
===================================================================
--- lib/drntest/response-normalizer.rb    2015-03-20 12:44:55 +0900 (5612bd8)
+++ lib/drntest/response-normalizer.rb    2015-03-20 12:51:09 +0900 (f1338ea)
@@ -130,7 +130,8 @@ module Drntest
 
     TABLE_PATH_COLUMN_INDEX = 2
     def normalize_groonga_table_list_command_body!(body)
-      return unless body.is_a?(Array) or body.empty?
+      return unless body.is_a?(Array)
+      return if body.empty?
       tables = body[0][1..-1]
       return unless tables.is_a?(Array)
       tables.each do |table|
@@ -142,7 +143,8 @@ module Drntest
 
     COLUMN_PATH_COLUMN_INDEX = 2
     def normalize_groonga_column_list_command_body!(body)
-      return unless body.is_a?(Array) or body.empty?
+      return unless body.is_a?(Array)
+      return if body.empty?
       columns = body[0][1..-1]
       return unless columns.is_a?(Array)
       columns.each do |column|
-------------- next part --------------
HTML����������������������������...
Download 



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