Skip to content

Commit

Permalink
[RubygemsExt] return Source::Installed from #source when appropriate
Browse files Browse the repository at this point in the history
  • Loading branch information
segiddins committed Jul 19, 2016
1 parent a3718ad commit f9de70e
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions lib/bundler/rubygems_ext.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,15 @@ module Gem
class Specification
attr_accessor :remote, :location, :relative_loaded_from

remove_method :source if instance_methods(false).include?(:source)
attr_accessor :source
if instance_methods(false).include?(:source)
remove_method :source
attr_writer :source
def source
(defined?(@source) && @source) || Gem::Source::Installed.new
end
else
attr_accessor :source
end

alias_method :rg_full_gem_path, :full_gem_path
alias_method :rg_loaded_from, :loaded_from
Expand Down

0 comments on commit f9de70e

Please sign in to comment.