[Groonga-commit] groonga/groonga-command at eff488d [master] Fix a bug that TableCreate#token_filters uses wrong separator

Back to archive index

Kouhei Sutou null+****@clear*****
Thu Dec 8 21:37:39 JST 2016


Kouhei Sutou	2016-12-08 21:37:39 +0900 (Thu, 08 Dec 2016)

  New Revision: eff488d694ff041780e80df6c23b391626e488b6
  https://github.com/groonga/groonga-command/commit/eff488d694ff041780e80df6c23b391626e488b6

  Message:
    Fix a bug that TableCreate#token_filters uses wrong separator
    
    Token filters are separated with "," not "|".

  Modified files:
    lib/groonga/command/table-create.rb
    test/command/test-table-create.rb

  Modified: lib/groonga/command/table-create.rb (+1 -1)
===================================================================
--- lib/groonga/command/table-create.rb    2016-12-08 21:37:28 +0900 (822075d)
+++ lib/groonga/command/table-create.rb    2016-12-08 21:37:39 +0900 (cbf0ebd)
@@ -115,7 +115,7 @@ module Groonga
       # @return [::Array<String>] Token filter names.
       # @since 1.2.1
       def token_filters
-        @token_filters ||= (self[:token_filters] || "").split(/\s*\|\s*/)
+        @token_filters ||= array_value(:token_filters)
       end
     end
   end

  Modified: test/command/test-table-create.rb (+1 -1)
===================================================================
--- test/command/test-table-create.rb    2016-12-08 21:37:28 +0900 (45696eb)
+++ test/command/test-table-create.rb    2016-12-08 21:37:39 +0900 (f9e4309)
@@ -209,7 +209,7 @@ class TableCreateCommandTest < Test::Unit::TestCase
   class TokenFiltersTest < self
     def test_multiple
       arguments = {
-        "token_filters" => "TokenFilterStopWord|TokenFilterStem",
+        "token_filters" => "TokenFilterStopWord,TokenFilterStem",
       }
       command = table_create_command(arguments)
       assert_equal(["TokenFilterStopWord", "TokenFilterStem"],
-------------- next part --------------
HTML����������������������������...
다운로드 



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