diff options
Diffstat (limited to 'lib/rubygems/commands/pristine_command.rb')
-rw-r--r-- | lib/rubygems/commands/pristine_command.rb | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/rubygems/commands/pristine_command.rb b/lib/rubygems/commands/pristine_command.rb index fafe35bec1..817e752266 100644 --- a/lib/rubygems/commands/pristine_command.rb +++ b/lib/rubygems/commands/pristine_command.rb @@ -24,7 +24,8 @@ class Gem::Commands::PristineCommand < Gem::Command add_option('--skip=gem_name', 'used on --all, skip if name == gem_name') do |value, options| - options[:skip] = value + options[:skip] ||= [] + options[:skip] << value end add_option('--[no-]extensions', @@ -115,9 +116,11 @@ extensions will be restored. next end - if spec.name == options[:skip] - say "Skipped #{spec.full_name}, it was given through options" - next + if options.has_key? :skip + if options[:skip].include? spec.name + say "Skipped #{spec.full_name}, it was given through options" + next + end end if spec.bundled_gem_in_old_ruby? |