Ruby tracing does not work with compiler
----------------------------------------
Key: JRUBY-1981
URL: http://jira.codehaus.org/browse/JRUBY-1981
Project: JRuby
Issue Type: Bug
Components: Compiler
Environment: JRuby 1.1RC1 from trunk.
Reporter: Vladimir Sizikov
Here's an example right from Pickaxe book:
{noformat}
class Test
def test
a = 1
b = 2
end
end
set_trace_func proc { |event, file, line, id, binding, classname|
printf "%8s %s:%-2d %10s %8s\n", event, file, line, id, classname
}
t = Test.new
{noformat}
MRI prints:
#>ruby bl1.rb
line bl1.rb:12 false
c-call bl1.rb:12 new Class
c-call bl1.rb:12 initialize Object
c-return bl1.rb:12 initialize Object
c-return bl1.rb:12 new Class
line bl1.rb:13 false
call bl1.rb:2 test Test
line bl1.rb:3 test Test
line bl1.rb:4 test Test
return bl1.rb:3 test Test
JRuby prints:
#>jruby bl1.rb
c-call bl1.rb:12 initialize Object
c-return bl1.rb:12 initialize Object
JRuby with compilation disabled prints:
#>jruby -X-C bl1.rb
line bl1.rb:12 false
c-call bl1.rb:12 initialize Object
c-return bl1.rb:12 initialize Object
line bl1.rb:13 false
call bl1.rb:2 test Test
line bl1.rb:3 test Test
line bl1.rb:4 test Test
return bl1.rb:8 test Test
As you see, when compilation in JRuby is enabled, the tracing doesn't work as
expected.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email