From 9ee8d9160f965be9ad6d9fb0ecbe282734ec523c Mon Sep 17 00:00:00 2001 From: Ryuta Kamizono Date: Sun, 5 Jan 2020 01:37:17 +0900 Subject: [PATCH] Fix keyword arguments warnings on `try` https://buildkite.com/rails/rails/builds/66168#b348f446-0406-425e-ba53-c5d15034cf98/1002-1070 --- activesupport/lib/active_support/core_ext/object/try.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/activesupport/lib/active_support/core_ext/object/try.rb b/activesupport/lib/active_support/core_ext/object/try.rb index fd8a92235f..999141a993 100644 --- a/activesupport/lib/active_support/core_ext/object/try.rb +++ b/activesupport/lib/active_support/core_ext/object/try.rb @@ -15,6 +15,7 @@ def try(method_name = nil, *args, &b) public_send(method_name, *args, &b) end end + ruby2_keywords(:try) if respond_to?(:ruby2_keywords, true) def try!(method_name = nil, *args, &b) if method_name.nil? && block_given? @@ -27,6 +28,7 @@ def try!(method_name = nil, *args, &b) public_send(method_name, *args, &b) end end + ruby2_keywords(:try!) if respond_to?(:ruby2_keywords, true) end end -- GitLab