[Groonga-commit] droonga/droonga-engine at 66a855b [master] Ignore whitespaces

Back to archive index

YUKI Hiroshi null+****@clear*****
Wed Apr 29 01:25:38 JST 2015


YUKI Hiroshi	2015-04-29 01:25:38 +0900 (Wed, 29 Apr 2015)

  New Revision: 66a855b75b2da63d935aa84a7face09f3b89f89b
  https://github.com/droonga/droonga-engine/commit/66a855b75b2da63d935aa84a7face09f3b89f89b

  Message:
    Ignore whitespaces

  Modified files:
    lib/droonga/timestamp.rb

  Modified: lib/droonga/timestamp.rb (+2 -1)
===================================================================
--- lib/droonga/timestamp.rb    2015-04-29 01:14:19 +0900 (6f0fae0)
+++ lib/droonga/timestamp.rb    2015-04-29 01:25:38 +0900 (a996008)
@@ -30,6 +30,7 @@ module Droonga
 
       def last_message_timestamp=(timestamp)
         if timestamp.is_a?(String)
+          timestamp = timestamp.strip
           if timestamp.empty?
             timestamp = nil
           else
@@ -49,7 +50,7 @@ module Droonga
       def last_message_timestamp
         file = Path.last_message_timestamp
         return nil unless file.exist?
-        timestamp = file.read
+        timestamp = file.read.strip
         return nil if timestamp.nil? or timestamp.empty?
         Time.parse(timestamp)
       end
-------------- next part --------------
HTML����������������������������...
Descargar 



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