From: SASADA Koichi Date: 2014-01-07T18:01:38+09:00 Subject: [ruby-core:59623] Re: [ruby-trunk - Bug #9321] rb_mod_const_missing does not generate a c-return event (2014/01/03 3:19), drkaes (Stefan Kaes) wrote: > @ko1: Why do you think the second patch creates a performance problem? > > Module#const_missing is an exceptional case. Am I missing something? Sorry for my misunderstanding. Let me clarify the spec. ### n = 0 TracePoint.new(){|tp| next if tp.event == :line case tp.event.to_s when /call/ puts "#{' ' * 2 * n}#{tp.inspect}" n+=1 when /return/ n-=1 if n>0 puts "#{' ' * 2 * n}#{tp.inspect}" else puts "#{' ' * 2 * n}#{tp.inspect}" end }.enable def f Object::XYZZY #=> const_missing end f __END__ #=> current behavior: # # # # # # # # # # # # # # # expected behavior: # # # # # # <-- NEW! # # # # # # # # # # is it right? This behavior is similar to "raise" behavior. -- // SASADA Koichi at atdot dot net