summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2019-04-08 16:24:24 +0200
committerDavid Rodríguez <deivid.rodriguez@riseup.net>2019-04-09 11:56:24 +0200
commit02b1b0adad2f2f48a70752c55739f0a07da43f0d (patch)
tree85b05e181fed0ef98e4a1cf226294ca4f7542847
parent47eaaa07a0b738284bf25a2fe443f1463f21e693 (diff)
downloadbundler-02b1b0adad2f2f48a70752c55739f0a07da43f0d.tar.gz
Remove unnecessary code
The `source` method has been there since rubygems 2.1.
-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