summaryrefslogtreecommitdiff
path: root/lib/bundler/stub_specification.rb
diff options
context:
space:
mode:
authorJulian Nadeau <julian@jnadeau.ca>2017-05-01 23:40:31 -0400
committerJulian Nadeau <julian@jnadeau.ca>2017-05-05 10:04:10 -0400
commit51623aae48bdf0365d577c6d9d4e1930ba328180 (patch)
tree8a924c99717017036c89b0b9a4c46d733a0585a9 /lib/bundler/stub_specification.rb
parentd085451947d41a0a3cdde3fd28723e11b842db7c (diff)
downloadbundler-51623aae48bdf0365d577c6d9d4e1930ba328180.tar.gz
Return Bundler::StubSpec if stub is a Bundler::StubSpec
Diffstat (limited to 'lib/bundler/stub_specification.rb')
-rw-r--r--lib/bundler/stub_specification.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/bundler/stub_specification.rb b/lib/bundler/stub_specification.rb
index d5f6a883f9..aeacf245a3 100644
--- a/lib/bundler/stub_specification.rb
+++ b/lib/bundler/stub_specification.rb
@@ -4,6 +4,7 @@ require "bundler/remote_specification"
module Bundler
class StubSpecification < RemoteSpecification
def self.from_stub(stub)
+ return stub if stub.is_a?(Bundler::StubSpecification)
spec = new(stub.name, stub.version, stub.platform, nil)
spec.stub = stub
spec