summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/rubygems/commands/dependency_command.rb3
-rw-r--r--lib/rubygems/local_remote_options.rb3
-rw-r--r--lib/rubygems/version_option.rb6
-rw-r--r--test/rubygems/test_gem_resolver.rb4
4 files changed, 6 insertions, 10 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])
diff --git a/test/rubygems/test_gem_resolver.rb b/test/rubygems/test_gem_resolver.rb
index 54497c6e4f..c849af04f3 100644
--- a/test/rubygems/test_gem_resolver.rb
+++ b/test/rubygems/test_gem_resolver.rb
@@ -207,8 +207,8 @@ class TestGemResolver < Gem::TestCase
s.add_development_dependency "b"
end
- b_spec = util_spec "b", 1 do
- |s| s.add_development_dependency "c"
+ b_spec = util_spec "b", 1 do |s|
+ s.add_development_dependency "c"
end
c_spec = util_spec "c", 1