Sha256: 4643afd59c7d9106b1b76488fcb11bf42163a2a6ebd06dd3cc0663f7527cb742
Contents?: true
Size: 751 Bytes
Versions: 16
Compression:
Stored size: 751 Bytes
Contents
class PryMoves::Finish < PryMoves::TraceCommand def init(binding_) @block_to_finish = frame_digest(binding_) if binding_.frame_type == :block end def trace(event, file, line, method, binding_) return true if @on_exit_from_method return if @call_depth > 0 or event == 'c-return' return true if @call_depth < 0 # early return: return true if event == 'return' and @call_depth == 0 and @method.within?(file, line) and method == @method[:name] and @method.before_end?(line) # for finishing blocks inside current method if @block_to_finish ((@call_depth == 0) ^ (event == 'return')) and @method.within?(file, line) and @block_to_finish != current_frame_digest end end end
Version data entries
16 entries across 16 versions & 1 rubygems