diff --git a/lib/bundler/rubygems_integration.rb b/lib/bundler/rubygems_integration.rb index 231b085f052..57abeda0880 100644 --- a/lib/bundler/rubygems_integration.rb +++ b/lib/bundler/rubygems_integration.rb @@ -571,7 +571,7 @@ def undo_replacements redefine_method(klass, sym, method) end if Binding.public_method_defined?(:source_location) - post_reset_hooks.reject! {|proc| proc.binding.source_location == __FILE__ } + post_reset_hooks.reject! {|proc| proc.binding.source_location[0] == __FILE__ } else post_reset_hooks.reject! {|proc| proc.binding.eval("__FILE__") == __FILE__ } end