diff options
-rw-r--r-- | lib/bundler/rubygems_ext.rb | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/bundler/rubygems_ext.rb b/lib/bundler/rubygems_ext.rb index c4464383e6..ccf71c8c00 100644 --- a/lib/bundler/rubygems_ext.rb +++ b/lib/bundler/rubygems_ext.rb @@ -21,7 +21,7 @@ module Gem class Specification attr_accessor :remote, :location, :relative_loaded_from - if instance_methods(false).map(&:to_sym).include?(:source) + if instance_methods(false).include?(:source) remove_method :source attr_writer :source def source @@ -81,10 +81,7 @@ module Gem end end - # RubyGems 1.8+ used only. - methods = instance_methods(false) - gem_dir = methods.first.is_a?(String) ? "gem_dir" : :gem_dir - remove_method :gem_dir if methods.include?(gem_dir) + remove_method :gem_dir if instance_methods(false).include?(:gem_dir) def gem_dir full_gem_path end |