[Groonga-commit] groonga/groonga at 890198c [master] mrb: fix inverted condition

Back to archive index

Kouhei Sutou null+****@clear*****
Wed Aug 31 19:15:36 JST 2016


Kouhei Sutou	2016-08-31 19:15:36 +0900 (Wed, 31 Aug 2016)

  New Revision: 890198c0880f34bf63ac667a5c11b1c7f5353564
  https://github.com/groonga/groonga/commit/890198c0880f34bf63ac667a5c11b1c7f5353564

  Message:
    mrb: fix inverted condition

  Modified files:
    lib/mrb/scripts/context.rb

  Modified: lib/mrb/scripts/context.rb (+2 -2)
===================================================================
--- lib/mrb/scripts/context.rb    2016-08-31 18:44:54 +0900 (97ba3f2)
+++ lib/mrb/scripts/context.rb    2016-08-31 19:15:36 +0900 (b6f59dc)
@@ -50,7 +50,7 @@ module Groonga
 
     def open_temporary(id)
       if Thread.limit == 1
-        need_close = opened?(id)
+        need_close = !opened?(id)
       else
         need_close = false
       end
@@ -58,7 +58,7 @@ module Groonga
       begin
         yield(object)
       ensure
-        if need_close and !object.closed?
+        if need_close and object and !object.closed?
           case object
           when Table, Column
             object.close
-------------- next part --------------
HTML����������������������������...
Download 



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