From ff908983be80f718497e32e60d24ac9b820df52c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Wed, 19 Jun 2019 15:31:40 +0200 Subject: [bundler/bundler] Extract `expanded_platforms` https://github.com/bundler/bundler/commit/60d720eb06 --- lib/bundler/dependency.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lib/bundler/dependency.rb') diff --git a/lib/bundler/dependency.rb b/lib/bundler/dependency.rb index 55ffea02b6..6c2642163e 100644 --- a/lib/bundler/dependency.rb +++ b/lib/bundler/dependency.rb @@ -105,11 +105,15 @@ module Bundler def gem_platforms(valid_platforms) return valid_platforms if @platforms.empty? - @gem_platforms ||= @platforms.map {|pl| PLATFORM_MAP[pl] }.compact.uniq + @gem_platforms ||= expanded_platforms.compact.uniq valid_platforms & @gem_platforms end + def expanded_platforms + @platforms.map {|pl| PLATFORM_MAP[pl] } + end + def should_include? @should_include && current_env? && current_platform? end -- cgit v1.2.3