Project

General

Profile

Actions

Bug #4584

closed

trace doesn't work for methods set up by attr_*

Added by QaDeS (Michael Klaus) about 11 years ago. Updated about 11 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Target version:
-
ruby -v:
ruby 1.8.7 (2011-02-18 patchlevel 334) [x86_64-linux]
[ruby-core:35791]

Description

=begin
See also issue #4583 for Ruby 1.9.

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.
=end


Related issues 1 (0 open1 closed)

Related to Ruby master - Bug #4583: trace doesn't work for methods set up by attr_*Rejectedko1 (Koichi Sasada)04/17/2011Actions

Updated by sorah (Sorah Fukumori) about 11 years ago

  • Status changed from Open to Rejected

=begin
From http://redmine.ruby-lang.org/projects/ruby/wiki/HowToReport

If you'll report a bug in both Ruby 1.9 and Ruby 1.8: Ruby 1.9, and write like "this bug can reproduce at Ruby 1.8, too."

So this issue (1.8) will be continued on Ruby1.9 tracker #4583.

Closing.

=end

Actions

Also available in: Atom PDF