diff options
author | Stephen Celis <stephen@stephencelis.com> | 2011-09-08 13:33:14 -0700 |
---|---|---|
committer | Stephen Celis <stephen@stephencelis.com> | 2011-09-13 16:06:34 -0700 |
commit | b4b409de2f9edf08a8df78fde1b6c7536fc73db5 (patch) | |
tree | 033bc410917c93d1a94c1239c3a2f89739155c09 | |
parent | 4925f523882a0450347a9b87e9b4a456066baaaa (diff) | |
download | bundler-b4b409de2f9edf08a8df78fde1b6c7536fc73db5.tar.gz |
Fix "method redefined" warnings.
-rw-r--r-- | lib/bundler/rubygems_ext.rb | 2 | ||||
-rw-r--r-- | lib/bundler/rubygems_integration.rb | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/lib/bundler/rubygems_ext.rb b/lib/bundler/rubygems_ext.rb index 54e72c53b7..20c08b7379 100644 --- a/lib/bundler/rubygems_ext.rb +++ b/lib/bundler/rubygems_ext.rb @@ -40,6 +40,7 @@ module Gem end # RubyGems 1.8+ used only. + remove_method :gem_dir if method_defined? :gem_dir def gem_dir full_gem_path end @@ -151,6 +152,7 @@ module Gem MSWIN = Gem::Platform.new('mswin32') MINGW = Gem::Platform.new('x86-mingw32') + undef_method :hash if method_defined? :hash def hash @cpu.hash ^ @os.hash ^ @version.hash end diff --git a/lib/bundler/rubygems_integration.rb b/lib/bundler/rubygems_integration.rb index 418b1e9518..bbbc7007d0 100644 --- a/lib/bundler/rubygems_integration.rb +++ b/lib/bundler/rubygems_integration.rb @@ -180,6 +180,7 @@ module Bundler end def stub_source_index170(specs) + Gem::SourceIndex.send(:alias_method, :old_initialize, :initialize) Gem::SourceIndex.send(:define_method, :initialize) do |*args| @gems = {} # You're looking at this thinking: Oh! This is how I make those |