diff options
author | Samuel Giddins <segiddins@segiddins.me> | 2016-09-16 12:22:35 +0200 |
---|---|---|
committer | Samuel Giddins <segiddins@segiddins.me> | 2016-09-16 12:22:35 +0200 |
commit | 6418a10fe4e26dd0904def5c05065390339db11a (patch) | |
tree | ff8135206a61956e5893ce5bf0a780e2101e683d | |
parent | 0b51b647d30228d4cbf86f5c6d5ff2c3171696e7 (diff) | |
download | bundler-6418a10fe4e26dd0904def5c05065390339db11a.tar.gz |
[RubygemsIntegration] Only set visibility if theres a method
-rw-r--r-- | lib/bundler/rubygems_integration.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/bundler/rubygems_integration.rb b/lib/bundler/rubygems_integration.rb index 23648554b7..23ae95aa04 100644 --- a/lib/bundler/rubygems_integration.rb +++ b/lib/bundler/rubygems_integration.rb @@ -502,10 +502,11 @@ module Bundler @replaced_methods[[method, klass]] = instance_method if unbound_method klass.send(:define_method, method, unbound_method) + klass.send(visibility, method) elsif block klass.send(:define_method, method, &block) + klass.send(visibility, method) end - klass.send(visibility, method) end def method_visibility(klass, method) |