diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/rubygems/commands/dependency_command.rb | 3 | ||||
-rw-r--r-- | lib/rubygems/local_remote_options.rb | 3 | ||||
-rw-r--r-- | lib/rubygems/version_option.rb | 6 |
3 files changed, 4 insertions, 8 deletions
diff --git a/lib/rubygems/commands/dependency_command.rb b/lib/rubygems/commands/dependency_command.rb index 3f69a95e83..a5870e9106 100644 --- a/lib/rubygems/commands/dependency_command.rb +++ b/lib/rubygems/commands/dependency_command.rb @@ -17,8 +17,7 @@ class Gem::Commands::DependencyCommand < Gem::Command add_prerelease_option add_option("-R", "--[no-]reverse-dependencies", - "Include reverse dependencies in the output") do - |value, options| + "Include reverse dependencies in the output") do |value, options| options[:reverse_dependencies] = value end diff --git a/lib/rubygems/local_remote_options.rb b/lib/rubygems/local_remote_options.rb index 0cf7564ce5..9751d9cd4c 100644 --- a/lib/rubygems/local_remote_options.rb +++ b/lib/rubygems/local_remote_options.rb @@ -65,8 +65,7 @@ module Gem::LocalRemoteOptions def add_bulk_threshold_option add_option(:"Local/Remote", "-B", "--bulk-threshold COUNT", "Threshold for switching to bulk", - "synchronization (default #{Gem.configuration.bulk_threshold})") do - |value, _options| + "synchronization (default #{Gem.configuration.bulk_threshold})") do |value, _options| Gem.configuration.bulk_threshold = value.to_i end end diff --git a/lib/rubygems/version_option.rb b/lib/rubygems/version_option.rb index 4dcd2c9266..538433f640 100644 --- a/lib/rubygems/version_option.rb +++ b/lib/rubygems/version_option.rb @@ -24,8 +24,7 @@ module Gem::VersionOption end add_option("--platform PLATFORM", Gem::Platform, - "Specify the platform of gem to #{task}", *wrap) do - |value, options| + "Specify the platform of gem to #{task}", *wrap) do |value, options| unless options[:added_platform] Gem.platforms = [Gem::Platform::RUBY] options[:added_platform] = true @@ -55,8 +54,7 @@ module Gem::VersionOption end add_option("-v", "--version VERSION", Gem::Requirement, - "Specify version of gem to #{task}", *wrap) do - |value, options| + "Specify version of gem to #{task}", *wrap) do |value, options| # Allow handling for multiple --version operators if options[:version] && !options[:version].none? options[:version].concat([value]) |