[Ironruby-core] IronRuby and MarkLogic
lists at ruby-forum.com
Fri Nov 30 09:30:25 EST 2007
John Messerly wrote:
> If you're up for diving into IronRuby's method binding logic, the place
> to put a breakpoint is in ironruby/runtime/RubyActionBinder.cs,
> MakeRuleForInvokeMember, in particular the line:
> RubyMethodBase method = ec.ResolveMethod(target, action.Name);
> At some point we'll hit that with action.Name == "NewSession". Then step
> into ResolveMethod and see what happens. It should eventually get to
> RubyClass.TryGetClrMember with name == "NewSession". But maybe it gets
> lost somewhere along the way...
> - John
Thanks John...I took up the task and here is what I found out (the most
important point is the last one - in uppercase - see below:
- target has only non-public members
- module is null, so it calls
RubyClass result = TryGetInstanceSingletonOf(obj, out data);
data = TryGetInstanceData(obj);
- obj (Marklogic.Xcc.Impl.ContentSourceImpl) is null inside of that
-eventually returns from TryGetInstanceData with result = null
- AND HERE IS THE PROBLEM...I think...
- inside RubyModule.cs (line 481):
// skip lookup on types that are not visible or interfaces:
if (_tracker != null && _tracker.Type.IsVisible &&
return TryGetClrMember(_tracker.Type, name, out method);
...this if returns false and it never calls TryGetClrMember!
Posted via http://www.ruby-forum.com/.
More information about the Ironruby-core