[Groonga-commit] ranguba/groonga-client-model at e224e66 [master] Support Ruby 2.0.0 again

Back to archive index

Kouhei Sutou null+****@clear*****
Fri Jan 20 13:54:00 JST 2017


Kouhei Sutou	2017-01-20 13:54:00 +0900 (Fri, 20 Jan 2017)

  New Revision: e224e661f1c9b312ca4cb203e6e594bfb84d7ff8
  https://github.com/ranguba/groonga-client-model/commit/e224e661f1c9b312ca4cb203e6e594bfb84d7ff8

  Message:
    Support Ruby 2.0.0 again
    
    Ruby 2.0.0 doesn't support required keyword argument yet.

  Modified files:
    lib/groonga_client_model/record.rb

  Modified: lib/groonga_client_model/record.rb (+4 -4)
===================================================================
--- lib/groonga_client_model/record.rb    2017-01-12 11:29:56 +0900 (87bd780)
+++ lib/groonga_client_model/record.rb    2017-01-20 13:54:00 +0900 (d2bfb7e)
@@ -198,7 +198,7 @@ module GroongaClientModel
     end
 
     private
-    def save_raw(validate:)
+    def save_raw(validate: true)
       if validate
         if valid?
           upsert(validate: true)
@@ -227,7 +227,7 @@ module GroongaClientModel
       freeze
     end
 
-    def upsert(validate:)
+    def upsert(validate: true)
       if new_record?
         run_callbacks(:create) do
           upsert_raw(validate: validate)
@@ -239,7 +239,7 @@ module GroongaClientModel
       end
     end
 
-    def upsert_raw(validate:)
+    def upsert_raw(validate: true)
       return false unless upsert_sub_records(validate: validate)
 
       Client.open do |client|
@@ -280,7 +280,7 @@ module GroongaClientModel
       end
     end
 
-    def upsert_sub_records(validate:)
+    def upsert_sub_records(validate: true)
       attributes.each do |name, value|
         return false unless upsert_sub_record(value, validate)
       end
-------------- next part --------------
HTML����������������������������...
Download 



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