[Groonga-commit] groonga/groonga-command-parser at 68c349b [master] Stop to assume that data is String

Back to archive index

Kouhei Sutou null+****@clear*****
Sat Aug 8 16:16:37 JST 2015


Kouhei Sutou	2015-08-08 16:16:37 +0900 (Sat, 08 Aug 2015)

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

  Message:
    Stop to assume that data is String

  Modified files:
    lib/groonga/command/parser.rb

  Modified: lib/groonga/command/parser.rb (+6 -1)
===================================================================
--- lib/groonga/command/parser.rb    2015-07-09 21:58:17 +0900 (91828c0)
+++ lib/groonga/command/parser.rb    2015-08-08 16:16:37 +0900 (3660f70)
@@ -96,7 +96,12 @@ module Groonga
 
           consume_data(parser, data)
           if parsed_command.nil?
-            raise Error.new("not completed", data.lines.to_a.last, "")
+            if data.respond_to?(:each)
+              last_chunk = data.last
+            else
+              last_chunk = data
+            end
+            raise Error.new("not completed", last_chunk, "")
           end
 
           parsed_command
-------------- next part --------------
HTML����������������������������...
Download 



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