diff options
Diffstat (limited to 'lib/rubygems/commands')
-rw-r--r-- | lib/rubygems/commands/build_command.rb | 2 | ||||
-rw-r--r-- | lib/rubygems/commands/check_command.rb | 2 | ||||
-rw-r--r-- | lib/rubygems/commands/query_command.rb | 8 | ||||
-rw-r--r-- | lib/rubygems/commands/server_command.rb | 2 | ||||
-rw-r--r-- | lib/rubygems/commands/update_command.rb | 4 |
5 files changed, 9 insertions, 9 deletions
diff --git a/lib/rubygems/commands/build_command.rb b/lib/rubygems/commands/build_command.rb index e1f0122c6c..c1ba9d2a63 100644 --- a/lib/rubygems/commands/build_command.rb +++ b/lib/rubygems/commands/build_command.rb @@ -35,7 +35,7 @@ class Gem::Commands::BuildCommand < Gem::Command while not f.eof? and spec = Gem::Specification.from_yaml(f) result << spec end - rescue Gem::EndOfYAMLException => e + rescue Gem::EndOfYAMLException # OK end end diff --git a/lib/rubygems/commands/check_command.rb b/lib/rubygems/commands/check_command.rb index 475aeb3795..0bfad9b97c 100644 --- a/lib/rubygems/commands/check_command.rb +++ b/lib/rubygems/commands/check_command.rb @@ -71,7 +71,7 @@ class Gem::Commands::CheckCommand < Gem::Command say "Verifying gem: '#{gem_name}'" begin Gem::Validator.new.verify_gem_file(gem_name) - rescue Exception => e + rescue Exception alert_error "#{gem_name} is invalid." end end diff --git a/lib/rubygems/commands/query_command.rb b/lib/rubygems/commands/query_command.rb index 93b417015c..65258fd1ac 100644 --- a/lib/rubygems/commands/query_command.rb +++ b/lib/rubygems/commands/query_command.rb @@ -161,19 +161,19 @@ class Gem::Commands::QueryCommand < Gem::Command end versions.each do |gem_name, matching_tuples| - matching_tuples = matching_tuples.sort_by do |(name, version,_),_| + matching_tuples = matching_tuples.sort_by do |(_, version,_),_| version end.reverse platforms = Hash.new { |h,version| h[version] = [] } - matching_tuples.map do |(name, version, platform,_),_| + matching_tuples.map do |(_, version, platform,_),_| platforms[version] << platform if platform end seen = {} - matching_tuples.delete_if do |(name, version,_),_| + matching_tuples.delete_if do |(_, version,_),_| if seen[version] then true else @@ -186,7 +186,7 @@ class Gem::Commands::QueryCommand < Gem::Command if options[:versions] then list = if platforms.empty? or options[:details] then - matching_tuples.map { |(name, version,_),_| version }.uniq + matching_tuples.map { |(_, version,_),_| version }.uniq else platforms.sort.reverse.map do |version, pls| if pls == [Gem::Platform::RUBY] then diff --git a/lib/rubygems/commands/server_command.rb b/lib/rubygems/commands/server_command.rb index 4277787035..1760700e27 100644 --- a/lib/rubygems/commands/server_command.rb +++ b/lib/rubygems/commands/server_command.rb @@ -17,7 +17,7 @@ class Gem::Commands::ServerCommand < Gem::Command else begin Socket.getservbyname port - rescue SocketError => e + rescue SocketError raise OptionParser::InvalidArgument, "#{port}: no such named service" end end diff --git a/lib/rubygems/commands/update_command.rb b/lib/rubygems/commands/update_command.rb index 45d82e9385..2e6f11949a 100644 --- a/lib/rubygems/commands/update_command.rb +++ b/lib/rubygems/commands/update_command.rb @@ -181,11 +181,11 @@ class Gem::Commands::UpdateCommand < Gem::Command end end - matching_gems = spec_tuples.select do |(name, version, platform),| + matching_gems = spec_tuples.select do |(name, _, platform),| name == l_name and Gem::Platform.match platform end - highest_remote_gem = matching_gems.sort_by do |(name, version),| + highest_remote_gem = matching_gems.sort_by do |(_, version),| version end.last |