[Groonga-commit] droonga/fluent-plugin-droonga at 18e8d72 [master] Detect self-reference of source

Back to archive index

YUKI Hiroshi null+****@clear*****
Thu Dec 26 19:48:29 JST 2013


YUKI Hiroshi	2013-12-26 19:48:29 +0900 (Thu, 26 Dec 2013)

  New Revision: 18e8d72ee1f1ed5efcca3e5131d8a16c49dd7a01
  https://github.com/droonga/fluent-plugin-droonga/commit/18e8d72ee1f1ed5efcca3e5131d8a16c49dd7a01

  Message:
    Detect self-reference of source

  Modified files:
    lib/droonga/searcher.rb

  Modified: lib/droonga/searcher.rb (+2 -0)
===================================================================
--- lib/droonga/searcher.rb    2013-12-26 19:45:14 +0900 (f31f715)
+++ lib/droonga/searcher.rb    2013-12-26 19:48:29 +0900 (f9b08c1)
@@ -49,6 +49,7 @@ module Droonga
         query_sorter = QuerySorter.new
         queries.each do |name, query|
           source = query["source"]
+          return true if source == name
           query_sorter.add(name, [source])
         end
         begin
@@ -86,6 +87,7 @@ module Droonga
       queries.each do |name, query|
         source = query["source"]
         raise MissingSourceParameter.new(name, queries) unless source
+        raise CyclicSource.new(queries) if name == source
         query_sorter.add(name, [source])
       end
       begin
-------------- next part --------------
HTML����������������������������...
Download 



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