From 5c2ca27df1d42265a8f5e48f956a293f877f9da2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Sun, 19 Sep 2021 16:24:15 +0200 Subject: [PATCH] Update Globalize monkey-patch to forward kw args This method changed in Globalize version 6.0.1 [1], which we're using since commit 6072372c9d. We were getting a deprecation warning in Ruby 2.7: ``` config/initializers/globalize.rb:8: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call ``` So we're using the `(...)` arguments syntax to make it compatible with Ruby 3.0, just like Globalize does when using Ruby 2.7. [1] See pull request 778 in the globalize/globalize GitHub repo. --- config/initializers/globalize.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/initializers/globalize.rb b/config/initializers/globalize.rb index 80fd85ca8..0a63e4d71 100644 --- a/config/initializers/globalize.rb +++ b/config/initializers/globalize.rb @@ -1,7 +1,7 @@ module Globalize module ActiveRecord module InstanceMethods - def save(*) + def save(...) # Credit for this code belongs to Jack Tomaszewski: # https://github.com/globalize/globalize/pull/578 Globalize.with_locale(Globalize.locale || I18n.default_locale) do