[Groonga-commit] groonga/groonga-command-parser at e4137a1 [master] Fix a bug that number is ignored

Back to archive index

Kouhei Sutou null+****@clear*****
Thu May 21 23:10:14 JST 2015


Kouhei Sutou	2015-05-21 23:10:14 +0900 (Thu, 21 May 2015)

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

  Message:
    Fix a bug that number is ignored

  Modified files:
    lib/groonga/command/parser/load-values-parser.rb

  Modified: lib/groonga/command/parser/load-values-parser.rb (+3 -2)
===================================================================
--- lib/groonga/command/parser/load-values-parser.rb    2015-05-21 23:08:28 +0900 (1f767c9)
+++ lib/groonga/command/parser/load-values-parser.rb    2015-05-21 23:10:14 +0900 (e74ec13)
@@ -102,10 +102,11 @@ module Groonga
           @number_callback = callback(:string, :size_t) do |data, size|
             number_data = data.slice(0, size)
             if /[\.eE]/ =~ number_data
-              number_data.to_f
+              number = number_data.to_f
             else
-              number_data.to_i
+              number = number_data.to_i
             end
+            push_value(number)
           end
           @string_callback = callback(:string, :size_t) do |data, size|
             string = data.slice(0, size)
-------------- next part --------------
HTML����������������������������...
Download 



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