Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: JRuby 1.3.1
-
Fix Version/s: None
-
Component/s: Interpreter
-
Labels:None
-
Number of attachments :
Description
Under MRI, passing -rtracer turns on the tracer, but it does nothing in JRuby:
$ jruby -rtracer -e 'puts :hi' hi $ ruby -rtracer -e 'puts :hi' #0:-e:1::-: puts :hi #0:-e:1:Kernel:>: puts :hi #0:-e:1:Symbol:>: puts :hi #0:-e:1:Symbol:<: puts :hi #0:-e:1:IO:>: puts :hi hi#0:-e:1:IO:<: puts :hi #0:-e:1:IO:>: puts :hi #0:-e:1:IO:<: puts :hi #0:-e:1:Kernel:<: puts :hi
This seems to be because caller(0) is incorrect for files required with -r:
$ echo puts caller(0).inspect >test.rb $ ruby -rtest -e ["./test.rb:1"] $ jruby -rtest -e ["test.rb:1", "test.rb:1"]
Tweaked code readability.