diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2019-04-08 16:24:24 +0200 |
---|---|---|
committer | David RodrÃguez <deivid.rodriguez@riseup.net> | 2019-04-09 11:56:24 +0200 |
commit | 02b1b0adad2f2f48a70752c55739f0a07da43f0d (patch) | |
tree | 85b05e181fed0ef98e4a1cf226294ca4f7542847 | |
parent | 47eaaa07a0b738284bf25a2fe443f1463f21e693 (diff) | |
download | bundler-02b1b0adad2f2f48a70752c55739f0a07da43f0d.tar.gz |
Remove unnecessary code
The `source` method has been there since rubygems 2.1.
-rw-r--r-- | lib/bundler/rubygems_ext.rb | 14 |
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 |