From e3090f7b5fa9eb36d47fedf93ab7fca95f47e0ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Busqu=C3=A9?= Date: Tue, 10 Jan 2023 10:01:57 +0100 Subject: [PATCH] Use more succint #then alias instead of #yield_self `Object#yield_self` is available from Ruby 2.6 [1] [1] - https://ruby-doc.org/core-2.6/Object.html#method-i-yield_self --- .../install/app_templates/frontend/break_down_solidus_gem.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/lib/generators/solidus/install/app_templates/frontend/break_down_solidus_gem.rb b/core/lib/generators/solidus/install/app_templates/frontend/break_down_solidus_gem.rb index 374052dadfd..f84817be958 100644 --- a/core/lib/generators/solidus/install/app_templates/frontend/break_down_solidus_gem.rb +++ b/core/lib/generators/solidus/install/app_templates/frontend/break_down_solidus_gem.rb @@ -18,7 +18,7 @@ def build_gem_lines(conservative_versioning) requirement = if is_local ", path: \"#{d.source.path}\"" elsif is_git - ", git: \"#{d.git}\"".yield_self { |g| d.ref ? g + ", ref: \"#{d.ref}\"" : g } + ", git: \"#{d.git}\"".then { |g| d.ref ? g + ", ref: \"#{d.ref}\"" : g } elsif conservative_versioning ", \"#{conservative_version(@definition.specs[d.name][0])}\"" else