summaryrefslogtreecommitdiff
path: root/lib/bundler/definition.rb
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2019-07-05 17:26:02 +0200
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2019-08-03 09:29:57 +0900
commitd0c19d1f87afeb9459644f2b348354d19f3285c3 (patch)
treed95935d21570994692cb4ba98c0ffc448e848cc3 /lib/bundler/definition.rb
parent6e0dc5594ced353aabdb3f118667ca987720e624 (diff)
[bundler/bundler] Use `tap` for `current_platforms`
https://github.com/bundler/bundler/commit/78608acf83
Diffstat (limited to 'lib/bundler/definition.rb')
-rw-r--r--lib/bundler/definition.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/bundler/definition.rb b/lib/bundler/definition.rb
index c0cd4c84e3..de3950a744 100644
--- a/lib/bundler/definition.rb
+++ b/lib/bundler/definition.rb
@@ -547,10 +547,10 @@ module Bundler
def current_platforms
current_platform = Bundler.local_platform
- platforms = []
- platforms << current_platform if Bundler.feature_flag.specific_platform?
- platforms << generic(current_platform)
- platforms
+ [].tap do |platforms|
+ platforms << current_platform if Bundler.feature_flag.specific_platform?
+ platforms << generic(current_platform)
+ end
end
def change_reason