summaryrefslogtreecommitdiff
path: root/lib/bundler/definition.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/bundler/definition.rb')
-rw-r--r--lib/bundler/definition.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/bundler/definition.rb b/lib/bundler/definition.rb
index 726e9d261b..ee966e7164 100644
--- a/lib/bundler/definition.rb
+++ b/lib/bundler/definition.rb
@@ -481,6 +481,11 @@ module Bundler
@platforms |= [platform]
end
+ def remove_platform(platform)
+ return if @platforms.delete(Gem::Platform.new(platform))
+ raise InvalidOption, "Unable to remove the platform `#{platform}` since the only platforms are #{@platforms.join ", "}"
+ end
+
attr_reader :sources
private :sources