summaryrefslogtreecommitdiff
path: root/lib/rubygems
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rubygems')
-rw-r--r--lib/rubygems/commands/install_command.rb2
-rw-r--r--lib/rubygems/commands/open_command.rb2
-rw-r--r--lib/rubygems/commands/yank_command.rb2
-rw-r--r--lib/rubygems/defaults.rb2
-rw-r--r--lib/rubygems/deprecate.rb4
-rw-r--r--lib/rubygems/indexer.rb2
-rw-r--r--lib/rubygems/resolver/molinillo/lib/molinillo/modules/specification_provider.rb2
-rw-r--r--lib/rubygems/test_utilities.rb2
8 files changed, 10 insertions, 8 deletions
diff --git a/lib/rubygems/commands/install_command.rb b/lib/rubygems/commands/install_command.rb
index 70825b88fd..dcab60c142 100644
--- a/lib/rubygems/commands/install_command.rb
+++ b/lib/rubygems/commands/install_command.rb
@@ -127,7 +127,7 @@ You can use `i` command instead of `install`.
end
def usage # :nodoc:
- "#{program_name} GEMNAME [GEMNAME ...] [options] -- --build-flags"
+ "#{program_name} [options] GEMNAME [GEMNAME ...] -- --build-flags"
end
def check_install_dir # :nodoc:
diff --git a/lib/rubygems/commands/open_command.rb b/lib/rubygems/commands/open_command.rb
index 1e40758ec5..8012a9a0e1 100644
--- a/lib/rubygems/commands/open_command.rb
+++ b/lib/rubygems/commands/open_command.rb
@@ -36,7 +36,7 @@ class Gem::Commands::OpenCommand < Gem::Command
end
def usage # :nodoc:
- "#{program_name} GEMNAME [-e COMMAND]"
+ "#{program_name} [-e COMMAND] GEMNAME"
end
def get_env_editor
diff --git a/lib/rubygems/commands/yank_command.rb b/lib/rubygems/commands/yank_command.rb
index 7e8b66b300..a7930253d6 100644
--- a/lib/rubygems/commands/yank_command.rb
+++ b/lib/rubygems/commands/yank_command.rb
@@ -24,7 +24,7 @@ data you will need to change them immediately and yank your gem.
end
def usage # :nodoc:
- "#{program_name} GEM -v VERSION [-p PLATFORM] [--key KEY_NAME] [--host HOST]"
+ "#{program_name} -v VERSION [-p PLATFORM] [--key KEY_NAME] [--host HOST] GEM"
end
def initialize
diff --git a/lib/rubygems/defaults.rb b/lib/rubygems/defaults.rb
index 8aae67cd6b..e95bc06792 100644
--- a/lib/rubygems/defaults.rb
+++ b/lib/rubygems/defaults.rb
@@ -198,7 +198,7 @@ module Gem
def self.default_bindir
if defined? RUBY_FRAMEWORK_VERSION # mac framework support
- '/usr/bin'
+ '/usr/local/bin'
else # generic install
RbConfig::CONFIG['bindir']
end
diff --git a/lib/rubygems/deprecate.rb b/lib/rubygems/deprecate.rb
index 67285d4161..8c822cda95 100644
--- a/lib/rubygems/deprecate.rb
+++ b/lib/rubygems/deprecate.rb
@@ -60,12 +60,13 @@ module Gem::Deprecate
target = klass ? "#{self}." : "#{self.class}#"
msg = [ "NOTE: #{target}#{name} is deprecated",
repl == :none ? " with no replacement" : "; use #{repl} instead",
- ". It will be removed on or after %4d-%02d-01." % [year, month],
+ ". It will be removed on or after %4d-%02d." % [year, month],
"\n#{target}#{name} called from #{Gem.location_of_caller.join(":")}",
]
warn "#{msg.join}." unless Gem::Deprecate.skip
send old, *args, &block
end
+ ruby2_keywords name if respond_to?(:ruby2_keywords, true)
end
end
@@ -90,6 +91,7 @@ module Gem::Deprecate
warn "#{msg.join}." unless Gem::Deprecate.skip
send old, *args, &block
end
+ ruby2_keywords name if respond_to?(:ruby2_keywords, true)
end
end
diff --git a/lib/rubygems/indexer.rb b/lib/rubygems/indexer.rb
index 31285ca962..e595459c87 100644
--- a/lib/rubygems/indexer.rb
+++ b/lib/rubygems/indexer.rb
@@ -136,7 +136,7 @@ class Gem::Indexer
say "Generating #{name} index"
Gem.time "Generated #{name} index" do
- open(file, 'wb') do |io|
+ File.open(file, 'wb') do |io|
specs = index.map do |*spec|
# We have to splat here because latest_specs is an array, while the
# others are hashes.
diff --git a/lib/rubygems/resolver/molinillo/lib/molinillo/modules/specification_provider.rb b/lib/rubygems/resolver/molinillo/lib/molinillo/modules/specification_provider.rb
index 9448dc7bf3..1067bf7439 100644
--- a/lib/rubygems/resolver/molinillo/lib/molinillo/modules/specification_provider.rb
+++ b/lib/rubygems/resolver/molinillo/lib/molinillo/modules/specification_provider.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
module Gem::Resolver::Molinillo
- # Provides information about specifcations and dependencies to the resolver,
+ # Provides information about specifications and dependencies to the resolver,
# allowing the {Resolver} class to remain generic while still providing power
# and flexibility.
#
diff --git a/lib/rubygems/test_utilities.rb b/lib/rubygems/test_utilities.rb
index 1371ae9b14..08faef6578 100644
--- a/lib/rubygems/test_utilities.rb
+++ b/lib/rubygems/test_utilities.rb
@@ -76,7 +76,7 @@ class Gem::FakeFetcher
def cache_update_path(uri, path = nil, update = true)
if data = fetch_path(uri)
- open(path, 'wb') {|io| io.write data } if path and update
+ File.open(path, 'wb') {|io| io.write data } if path and update
data
else
Gem.read_binary(path) if path