summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/bundler/rubygems_ext.rb14
1 files changed, 4 insertions, 10 deletions
diff --git a/lib/bundler/rubygems_ext.rb b/lib/bundler/rubygems_ext.rb
index 379639bc52..3488c536fd 100644
--- a/lib/bundler/rubygems_ext.rb
+++ b/lib/bundler/rubygems_ext.rb
@@ -14,16 +14,10 @@ module Gem
class Specification
attr_accessor :remote, :location, :relative_loaded_from
- if instance_methods(false).include?(:source)
- remove_method :source
- attr_writer :source
- def source
- (defined?(@source) && @source) || Gem::Source::Installed.new
- end
- else
- # rubocop:disable Lint/DuplicateMethods
- attr_accessor :source
- # rubocop:enable Lint/DuplicateMethods
+ remove_method :source
+ attr_writer :source
+ def source
+ (defined?(@source) && @source) || Gem::Source::Installed.new
end
alias_method :rg_full_gem_path, :full_gem_path