diff --git a/lib/pry/core_extensions.rb b/lib/pry/core_extensions.rb index 1bd294e8..7e1ef63c 100644 --- a/lib/pry/core_extensions.rb +++ b/lib/pry/core_extensions.rb @@ -30,13 +30,13 @@ class Object begin instance_eval %{ def __binding_impl__ - Kernel.binding + binding end } rescue TypeError self.class.class_eval %{ def __binding_impl__ - Kernel.binding + binding end } end diff --git a/test/test_pry.rb b/test/test_pry.rb index 179ec5fa..9413f4c7 100644 --- a/test/test_pry.rb +++ b/test/test_pry.rb @@ -297,11 +297,6 @@ describe Pry do Pry.binding_for(_main_.call).should == TOPLEVEL_BINDING Pry.binding_for(_main_.call).should == Pry.binding_for(_main_.call) end - - it 'should return a binding with the right self for procs' do - proc = Proc.new {} - Pry.binding_for(proc).eval("self").should.equal? proc - end end