[Groonga-commit] groonga/groonga at 560a349 [master] mrb: use "class << self" syntax

Back to archive index

Kouhei Sutou null+****@clear*****
Mon Jul 27 18:42:04 JST 2015


Kouhei Sutou	2015-07-27 18:42:04 +0900 (Mon, 27 Jul 2015)

  New Revision: 560a3491f8118d41534da54298bd18504072edd0
  https://github.com/groonga/groonga/commit/560a3491f8118d41534da54298bd18504072edd0

  Message:
    mrb: use "class << self" syntax
    
    mruby bug related to the syntax has been fixed.

  Modified files:
    lib/mrb/scripts/logger/level.rb
    lib/mrb/scripts/query_logger/flag.rb

  Modified: lib/mrb/scripts/logger/level.rb (+4 -2)
===================================================================
--- lib/mrb/scripts/logger/level.rb    2015-07-27 18:38:38 +0900 (b766099)
+++ lib/mrb/scripts/logger/level.rb    2015-07-27 18:42:04 +0900 (ab0a984)
@@ -2,8 +2,10 @@ module Groonga
   class Logger
     class Level
       @@names = {}
-      def self.find(name)
-        @@names[name]
+      class << self
+        def find(name)
+          @@names[name]
+        end
       end
 
       attr_reader :name

  Modified: lib/mrb/scripts/query_logger/flag.rb (+4 -2)
===================================================================
--- lib/mrb/scripts/query_logger/flag.rb    2015-07-27 18:38:38 +0900 (1e4c3dd)
+++ lib/mrb/scripts/query_logger/flag.rb    2015-07-27 18:42:04 +0900 (659570f)
@@ -2,8 +2,10 @@ module Groonga
   class QueryLogger
     class Flag
       @@names = {}
-      def self.find(name)
-        @@names[name]
+      class << self
+        def find(name)
+          @@names[name]
+        end
       end
 
       attr_reader :name
-------------- next part --------------
HTML����������������������������...
Download 



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