Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: JRuby 0.9.2
-
Fix Version/s: JRuby 0.9.9
-
Component/s: Interpreter
-
Labels:None
-
Number of attachments :
Description
A trace function has the signature
trace_func(event, file, line, id, binding, klass)
The binding parameter should be an object that allows to lookup variables in the current scope.
The code in Ruby.callTraceFunction that sets this parameter is:
self != null ? self : getNil(),
which basically gives the name/type of the self object.
I believe that something like
context.getCurrentScope().getBindingScope()
would be better.
Mind you: I'm not entirely sure, though, what exactly the Binding class is supposed to be. The documentation is a bit scarce on this.
Issue Links
- is duplicated by
-
JRUBY-832
Binding passed to set_trace_func callback has a wrong type
-