summaryrefslogtreecommitdiff
path: root/lib/rubygems/stub_specification.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rubygems/stub_specification.rb')
-rw-r--r--lib/rubygems/stub_specification.rb30
1 files changed, 15 insertions, 15 deletions
diff --git a/lib/rubygems/stub_specification.rb b/lib/rubygems/stub_specification.rb
index ac7fc6109a..1f2dbbc2e2 100644
--- a/lib/rubygems/stub_specification.rb
+++ b/lib/rubygems/stub_specification.rb
@@ -36,18 +36,18 @@ class Gem::StubSpecification < Gem::BasicSpecification
parts = data[PREFIX.length..-1].split(" ".freeze, 4)
@name = parts[0].freeze
@version = if Gem::Version.correct?(parts[1])
- Gem::Version.new(parts[1])
- else
- Gem::Version.new(0)
- end
+ Gem::Version.new(parts[1])
+ else
+ Gem::Version.new(0)
+ end
@platform = Gem::Platform.new parts[2]
@extensions = extensions
@full_name = if platform == Gem::Platform::RUBY
- "#{name}-#{version}"
- else
- "#{name}-#{version}-#{platform}"
- end
+ "#{name}-#{version}"
+ else
+ "#{name}-#{version}-#{platform}"
+ end
path_list = parts.last
@require_paths = REQUIRE_PATH_LIST[path_list] || path_list.split("\0".freeze).map! do |x|
@@ -116,10 +116,10 @@ class Gem::StubSpecification < Gem::BasicSpecification
stubline = file.readline.chomp
if stubline.start_with?(PREFIX)
extensions = if /\A#{PREFIX}/ =~ file.readline.chomp
- $'.split "\0"
- else
- StubLine::NO_EXTENSIONS
- end
+ $'.split "\0"
+ else
+ StubLine::NO_EXTENSIONS
+ end
@data = StubLine.new stubline, extensions
end
@@ -185,9 +185,9 @@ class Gem::StubSpecification < Gem::BasicSpecification
def to_spec
@spec ||= if @data
- loaded = Gem.loaded_specs[name]
- loaded if loaded && loaded.version == version
- end
+ loaded = Gem.loaded_specs[name]
+ loaded if loaded && loaded.version == version
+ end
@spec ||= Gem::Specification.load(loaded_from)
end