[Groonga-commit] groonga/groonga at 96ec1d7 [master] Reduce scope

Back to archive index

Kouhei Sutou null+****@clear*****
Thu May 25 09:59:25 JST 2017


Kouhei Sutou	2017-05-25 09:59:25 +0900 (Thu, 25 May 2017)

  New Revision: 96ec1d7df58a6dd0d7de6fcfca2160917d9a0f70
  https://github.com/groonga/groonga/commit/96ec1d7df58a6dd0d7de6fcfca2160917d9a0f70

  Message:
    Reduce scope
    
    We shouldn't use instance variable for value needed only in local scope.

  Modified files:
    plugins/sharding/logical_enumerator.rb

  Modified: plugins/sharding/logical_enumerator.rb (+2 -2)
===================================================================
--- plugins/sharding/logical_enumerator.rb    2017-05-25 09:55:07 +0900 (03e5745)
+++ plugins/sharding/logical_enumerator.rb    2017-05-25 09:59:25 +0900 (8fa388c)
@@ -186,8 +186,8 @@ module Groonga
 
         def least_over_time
           if @max_day.nil?
-            @next_month = (1..11).include?(@month) ? @month+1 : 1
-            Time.local(@year, @next_month, 1)
+            next_month = (1..11).include?(@month) ? @month+1 : 1
+            Time.local(@year, next_month, 1)
           else
             Time.local(@year, @month, @max_day, 23, 59, 59, 999999)
           end
-------------- next part --------------
HTML����������������������������...
Download 



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