Skip to content

Commit 7125f76

Browse files
deivid-rodriguezhsbt
authored andcommitted
[rubygems/rubygems] Use spaces around optional parameter values
ruby/rubygems@b58829a868
1 parent 8576da4 commit 7125f76

32 files changed

+54
-54
lines changed

lib/bundler/resolver.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ def parse_dependency(package, dependency)
165165
PubGrub::VersionConstraint.new(package, range: range)
166166
end
167167

168-
def versions_for(package, range=VersionRange.any)
168+
def versions_for(package, range = VersionRange.any)
169169
range.select_versions(@sorted_versions[package])
170170
end
171171

lib/bundler/rubygems_ext.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ class NameTuple
417417
unless Gem::NameTuple.new("a", Gem::Version.new("1"), Gem::Platform.new("x86_64-linux")).platform.is_a?(String)
418418
alias_method :initialize_with_platform, :initialize
419419

420-
def initialize(name, version, platform=Gem::Platform::RUBY)
420+
def initialize(name, version, platform = Gem::Platform::RUBY)
421421
if Gem::Platform === platform
422422
initialize_with_platform(name, version, platform.to_s)
423423
else

lib/rubygems.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ def self.needs
224224
finish_resolve rs
225225
end
226226

227-
def self.finish_resolve(request_set=Gem::RequestSet.new)
227+
def self.finish_resolve(request_set = Gem::RequestSet.new)
228228
request_set.import Gem::Specification.unresolved_deps.values
229229
request_set.import Gem.loaded_specs.values.map {|s| Gem::Dependency.new(s.name, s.version) }
230230

@@ -341,7 +341,7 @@ def self.binary_mode
341341
##
342342
# The path where gem executables are to be installed.
343343

344-
def self.bindir(install_dir=Gem.dir)
344+
def self.bindir(install_dir = Gem.dir)
345345
return File.join install_dir, "bin" unless
346346
install_dir.to_s == Gem.default_dir.to_s
347347
Gem.default_bindir
@@ -350,7 +350,7 @@ def self.bindir(install_dir=Gem.dir)
350350
##
351351
# The path were rubygems plugins are to be installed.
352352

353-
def self.plugindir(install_dir=Gem.dir)
353+
def self.plugindir(install_dir = Gem.dir)
354354
File.join install_dir, "plugins"
355355
end
356356

@@ -534,7 +534,7 @@ def self.extension_api_version # :nodoc:
534534
# Note that find_files will return all files even if they are from different
535535
# versions of the same gem. See also find_latest_files
536536

537-
def self.find_files(glob, check_load_path=true)
537+
def self.find_files(glob, check_load_path = true)
538538
files = []
539539

540540
files = find_files_from_load_path glob if check_load_path
@@ -571,7 +571,7 @@ def self.find_files_from_load_path(glob) # :nodoc:
571571
# Unlike find_files, find_latest_files will return only files from the
572572
# latest version of a gem.
573573

574-
def self.find_latest_files(glob, check_load_path=true)
574+
def self.find_latest_files(glob, check_load_path = true)
575575
files = []
576576

577577
files = find_files_from_load_path glob if check_load_path

lib/rubygems/command.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ def self.specific_extra_args_hash
117117
# Unhandled arguments (gem names, files, etc.) are left in
118118
# <tt>options[:args]</tt>.
119119

120-
def initialize(command, summary=nil, defaults={})
120+
def initialize(command, summary = nil, defaults = {})
121121
@command = command
122122
@summary = summary
123123
@program_name = "gem #{command}"

lib/rubygems/command_manager.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ def initialize
118118
##
119119
# Register the Symbol +command+ as a gem command.
120120

121-
def register_command(command, obj=false)
121+
def register_command(command, obj = false)
122122
@commands[command] = obj
123123
end
124124

@@ -148,7 +148,7 @@ def command_names
148148
##
149149
# Run the command specified by +args+.
150150

151-
def run(args, build_args=nil)
151+
def run(args, build_args = nil)
152152
process_args(args, build_args)
153153
rescue StandardError, Gem::Timeout::Error => ex
154154
if ex.respond_to?(:detailed_message)
@@ -165,7 +165,7 @@ def run(args, build_args=nil)
165165
terminate_interaction(1)
166166
end
167167

168-
def process_args(args, build_args=nil)
168+
def process_args(args, build_args = nil)
169169
if args.empty?
170170
say Gem::Command::HELP
171171
terminate_interaction 1

lib/rubygems/dependency.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ def =~(other)
217217
# NOTE: Unlike #matches_spec? this method does not return true when the
218218
# version is a prerelease version unless this is a prerelease dependency.
219219

220-
def match?(obj, version=nil, allow_prerelease=false)
220+
def match?(obj, version = nil, allow_prerelease = false)
221221
if !version
222222
name = obj.name
223223
version = obj.version

lib/rubygems/dependency_installer.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ def consider_remote?
127127
# sources. Gems are sorted with newer gems preferred over older gems, and
128128
# local gems preferred over remote gems.
129129

130-
def find_gems_with_sources(dep, best_only=false) # :nodoc:
130+
def find_gems_with_sources(dep, best_only = false) # :nodoc:
131131
set = Gem::AvailableSet.new
132132

133133
if consider_local?

lib/rubygems/dependency_list.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ def why_not_ok?(quick = false)
140140
# If removing the gemspec creates breaks a currently ok dependency, then it
141141
# is NOT ok to remove the gemspec.
142142

143-
def ok_to_remove?(full_name, check_dev=true)
143+
def ok_to_remove?(full_name, check_dev = true)
144144
gem_to_remove = find_name full_name
145145

146146
# If the state is inconsistent, at least don't crash

lib/rubygems/deprecate.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ def deprecate(name, repl, year, month)
126126
# telling the user of +repl+ (unless +repl+ is :none) and the
127127
# Rubygems version that it is planned to go away.
128128

129-
def rubygems_deprecate(name, replacement=:none, version=nil)
129+
def rubygems_deprecate(name, replacement = :none, version = nil)
130130
class_eval do
131131
old = "_deprecated_#{name}"
132132
alias_method old, name

lib/rubygems/errors.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class LoadError < ::LoadError
2626
# system. Instead of rescuing from this class, make sure to rescue from the
2727
# superclass Gem::LoadError to catch all types of load errors.
2828
class MissingSpecError < Gem::LoadError
29-
def initialize(name, requirement, extra_message=nil)
29+
def initialize(name, requirement, extra_message = nil)
3030
@name = name
3131
@requirement = requirement
3232
@extra_message = extra_message

0 commit comments

Comments
 (0)