diff options
Diffstat (limited to 'lib/rubygems/source.rb')
-rw-r--r-- | lib/rubygems/source.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/rubygems/source.rb b/lib/rubygems/source.rb index 5530c2ce32..faed7bd350 100644 --- a/lib/rubygems/source.rb +++ b/lib/rubygems/source.rb @@ -68,7 +68,7 @@ class Gem::Source end end - def == other # :nodoc: + def ==(other) # :nodoc: self.class === other and @uri == other.uri end @@ -88,7 +88,7 @@ class Gem::Source rescue Gem::RemoteFetcher::FetchError Gem::Resolver::IndexSet.new self else - if response.respond_to? :uri then + if response.respond_to? :uri Gem::Resolver::APISet.new response.uri else Gem::Resolver::APISet.new bundler_api_uri @@ -126,7 +126,7 @@ class Gem::Source ## # Fetches a specification for the given +name_tuple+. - def fetch_spec name_tuple + def fetch_spec(name_tuple) fetcher = Gem::RemoteFetcher.fetcher spec_file_name = name_tuple.spec_name @@ -137,7 +137,7 @@ class Gem::Source local_spec = File.join cache_dir, spec_file_name - if File.exist? local_spec then + if File.exist? local_spec spec = Gem.read_binary local_spec spec = Marshal.load(spec) rescue nil return spec if spec @@ -148,7 +148,7 @@ class Gem::Source spec = fetcher.fetch_path source_uri spec = Gem::Util.inflate spec - if update_cache? then + if update_cache? FileUtils.mkdir_p cache_dir File.open local_spec, 'wb' do |io| @@ -206,7 +206,7 @@ class Gem::Source fetcher.download spec, uri.to_s, dir end - def pretty_print q # :nodoc: + def pretty_print(q) # :nodoc: q.group 2, '[Remote:', ']' do q.breakable q.text @uri.to_s |