From: "cfis (Charlie Savage) via ruby-core" Date: 2025-05-14T23:59:45+00:00 Subject: [ruby-core:122110] [Ruby Bug#21338] TracePoint Not Triggered for Kernel#block_given? Issue #21338 has been updated by cfis (Charlie Savage). ruby-prof does listen for C calls. See: https://github.com/ruby-prof/ruby-prof/blob/master/ext/ruby_prof/rp_profile.c#L337 ``` c void prof_install_hook(VALUE self) { prof_profile_t* profile = prof_get_profile(self); VALUE event_tracepoint = rb_tracepoint_new(Qnil, RUBY_EVENT_CALL | RUBY_EVENT_RETURN | RUBY_EVENT_C_CALL | RUBY_EVENT_C_RETURN | RUBY_EVENT_LINE, prof_event_hook, profile); ``` Once again, this is change in behavior between 3.3 and 3.4. Was it intentional? ---------------------------------------- Bug #21338: TracePoint Not Triggered for Kernel#block_given? https://bugs.ruby-lang.org/issues/21338#change-113263 * Author: cfis (Charlie Savage) * Status: Rejected * ruby -v: ruby 3.4.2 (2025-02-15 revision d2930f8e7a) +PRISM [x86_64-linux] * Backport: 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN ---------------------------------------- When updating ruby-prof for Ruby 3.4, various tests now fail because a method enter/leave tracepoint is not triggered for `Kernel#block_given?` For example: https://github.com/ruby-prof/ruby-prof/blob/master/test/line_number_test.rb#L184 In 3.3 a tracepoint was triggered but not in earlier Ruby versions. -- https://bugs.ruby-lang.org/ ______________________________________________ ruby-core mailing list -- ruby-core@ml.ruby-lang.org To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/