Sha256: 38752aa3628dc1da0195dd91ac479f0193957db4120fb1cb26ff9a3f8685dac4
Contents?: true
Size: 472 Bytes
Versions: 9
Compression:
Stored size: 472 Bytes
Contents
require 'binding_of_callers' require 'pry' class Binding def pry(object=nil, hash={}) bs = of_callers!.tap &:shift bs_indexed = bs.each_with_object({}){|b, h| h[h.keys.count] = b} Pry.hooks.add_hook :when_started, "original_binding_stack_#{object_id}" do |target, options, pry_self| pry_self.inject_local :_bs_, bs, pry_self.current_binding pry_self.inject_local :_bsi_, bs_indexed, pry_self.current_binding end Pry.start self end end
Version data entries
9 entries across 9 versions & 1 rubygems