From: redmine@... Date: 2011-04-18T07:56:59+09:00 Subject: [ruby-core:35800] [Ruby 1.9 - Bug #4583] trace doesn't work for methods set up by attr_* Issue #4583 has been updated by Michael Klaus. File test_settracefunc-1.8.7.patch added File test_settracefunc-1.9.2.patch added Modified the test to show the binding problem. ---------------------------------------- Bug #4583: trace doesn't work for methods set up by attr_* http://redmine.ruby-lang.org/issues/4583 Author: Michael Klaus Status: Assigned Priority: Normal Assignee: Koichi Sasada Category: core Target version: ruby -v: ruby 1.9.2p180 (2011-02-18 revision 30909) [x86_64-linux] Methods set up with (({attr_accessor})) or alike are not traceable: class Foo attr_writer :bar def baz=(value) @baz = value end end set_trace_func proc{|*args| puts args.inspect} @foo = Foo.new # will be traced @foo.bar = 'bar' # call to bar= will not be traced @foo.baz = 'baz' # call to baz= will be traced Expected behavior: "c-call" and "c-return" are traced. -- http://redmine.ruby-lang.org