diff options
Diffstat (limited to 'lib/rubygems/stub_specification.rb')
-rw-r--r-- | lib/rubygems/stub_specification.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/rubygems/stub_specification.rb b/lib/rubygems/stub_specification.rb index 8dd6df17e3..022da9185d 100644 --- a/lib/rubygems/stub_specification.rb +++ b/lib/rubygems/stub_specification.rb @@ -32,7 +32,7 @@ class Gem::StubSpecification < Gem::BasicSpecification 'lib' => ['lib'].freeze }.freeze - def initialize data, extensions + def initialize(data, extensions) parts = data[PREFIX.length..-1].split(" ".freeze, 4) @name = parts[0].freeze @version = if Gem::Version.correct?(parts[1]) @@ -56,17 +56,17 @@ class Gem::StubSpecification < Gem::BasicSpecification end end - def self.default_gemspec_stub filename, base_dir, gems_dir + def self.default_gemspec_stub(filename, base_dir, gems_dir) new filename, base_dir, gems_dir, true end - def self.gemspec_stub filename, base_dir, gems_dir + def self.gemspec_stub(filename, base_dir, gems_dir) new filename, base_dir, gems_dir, false end attr_reader :base_dir, :gems_dir - def initialize filename, base_dir, gems_dir, default_gem + def initialize(filename, base_dir, gems_dir, default_gem) super() filename.untaint @@ -115,7 +115,7 @@ class Gem::StubSpecification < Gem::BasicSpecification begin file.readline # discard encoding line stubline = file.readline.chomp - if stubline.start_with?(PREFIX) then + if stubline.start_with?(PREFIX) extensions = if /\A#{PREFIX}/ =~ file.readline.chomp $'.split "\0" else @@ -185,7 +185,7 @@ class Gem::StubSpecification < Gem::BasicSpecification # The full Gem::Specification for this gem, loaded from evalling its gemspec def to_spec - @spec ||= if @data then + @spec ||= if @data loaded = Gem.loaded_specs[name] loaded if loaded && loaded.version == version end |