Skip to content

Commit

Permalink
Fix "method redefined" warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
stephencelis committed Sep 13, 2011
1 parent 4925f52 commit b4b409d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/bundler/rubygems_ext.rb
Expand Up @@ -40,6 +40,7 @@ def load_paths
end

# RubyGems 1.8+ used only.
remove_method :gem_dir if method_defined? :gem_dir
def gem_dir
full_gem_path
end
Expand Down Expand Up @@ -151,6 +152,7 @@ class Platform
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
Expand Down
1 change: 1 addition & 0 deletions lib/bundler/rubygems_integration.rb
Expand Up @@ -180,6 +180,7 @@ def stub_source_index137(specs)
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
Expand Down

0 comments on commit b4b409d

Please sign in to comment.