Project

General

Profile

Bug #11492

TracePoint API report extra return for defined method

Added by os97673 (Oleg Sukhodolsky) about 5 years ago. Updated about 5 years ago.

Status:
Closed
Priority:
Normal
Target version:
-
ruby -v:
ruby 2.2.3p173 (2015-08-18 revision 51636) [x86_64-darwin14]
[ruby-core:<unknown>]

Description

class A
  define_method "method1" do
    # puts "#{method_name}(#{arg})"
    return 1
  end
end

a = A.new

TracePoint.new do |tp|
  printf "%8s %13s %s:%-2d\n", tp.event, tp.method_id, tp.path, tp.lineno
end.enable do
  a.method1
end

Related issues

Related to Backport21 - Backport #11646: Please backport r51713ClosedActions

Also available in: Atom PDF