[Groonga-commit] groonga/groonga-query-log at 66d01f0 [master] Statistic#each_operation: support enumerator

アーカイブの一覧に戻る

Kouhei Sutou null+****@clear*****
Mon Nov 20 15:26:36 JST 2017


Kouhei Sutou	2017-11-20 15:26:36 +0900 (Mon, 20 Nov 2017)

  New Revision: 66d01f01bfdd9ee0880d0a438c713e4e6e6f200d
  https://github.com/groonga/groonga-query-log/commit/66d01f01bfdd9ee0880d0a438c713e4e6e6f200d

  Message:
    Statistic#each_operation: support enumerator

  Modified files:
    lib/groonga/query-log/analyzer/statistic.rb

  Modified: lib/groonga/query-log/analyzer/statistic.rb (+3 -3)
===================================================================
--- lib/groonga/query-log/analyzer/statistic.rb    2017-10-26 11:29:02 +0900 (8d30ce3)
+++ lib/groonga/query-log/analyzer/statistic.rb    2017-11-20 15:26:36 +0900 (831216c)
@@ -1,6 +1,4 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (C) 2011-2012  Kouhei Sutou <kou �� clear-code.com>
+# Copyright (C) 2011-2017  Kouhei Sutou <kou �� clear-code.com>
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -76,6 +74,8 @@ module Groonga
         end
 
         def each_operation
+          return to_enum(__method__) unless block_given?
+
           previous_elapsed = 0
           ensure_parse_command
           operation_context_context = {
-------------- next part --------------
HTML����������������������������...
URL: https://lists.osdn.me/mailman/archives/groonga-commit/attachments/20171120/16c90f85/attachment-0001.htm 



More information about the Groonga-commit mailing list
アーカイブの一覧に戻る