YUKI Hiroshi
null+****@clear*****
Wed May 29 14:14:42 JST 2013
YUKI Hiroshi 2013-05-29 14:14:42 +0900 (Wed, 29 May 2013) New Revision: 15ba1cf9e75bf2461ea9f45431d50365a44ec13f https://github.com/groonga/fluent-plugin-droonga/commit/15ba1cf9e75bf2461ea9f45431d50365a44ec13f Message: Detect string type static value correctly Modified files: lib/droonga/plugin/handler_search.rb Modified: lib/droonga/plugin/handler_search.rb (+5 -4) =================================================================== --- lib/droonga/plugin/handler_search.rb 2013-05-29 13:46:24 +0900 (f6c1b51) +++ lib/droonga/plugin/handler_search.rb 2013-05-29 14:14:42 +0900 (134da1a) @@ -282,10 +282,11 @@ module Droonga else source = attribute["source"] static_value = nil - if STATIC_NUMBER_VALUE_PATTERN =~ source - static_value = source.to_i - elsif STATIC_NUMBER_VALUE_PATTERN =~ source - static_value = source[1..-2] + case source + when STATIC_NUMBER_VALUE_PATTERN + static_value = source.to_i + when STATIC_STRING_VALUE_PATTERN + static_value = source[1..-2] end { label: attribute["label"] || attribute["source"], -------------- next part -------------- HTML����������������������������... ダウンロード