#182: The constant lookup in MacRuby does not behave correctly
----------------------------------------+-----------------------------------
Reporter: vincent.isamb...@… | Owner: lsansone...@…
Type: defect | Status: new
Priority: major | Milestone:
Component: MacRuby | Keywords:
----------------------------------------+-----------------------------------
Comment(by vincent.isamb...@…):
The problem is in variable.c, in rb_const_get_0:
{{{
/* Classes are typically pre-loaded by Kernel#framework and imported
by
* rb_objc_resolve_const_value(), but it is still useful to keep the
* dynamic import facility, because someone in the Objective-C world
may
* dynamically define classes at runtime (like
ScriptingBridge.framework).
*/
{
Class k = (Class)objc_getClass(rb_id2name(id));
if (k != NULL)
return (VALUE)k;
}
}}}
You should keep this, but only return the class if it's not a Ruby class
because if it's a Ruby class and you did not find it before, it's that
it's in a different place in the namespace.
--
Ticket URL: <http://www.macruby.org/trac/ticket/182#comment:1>
MacRuby <http://macruby.org/>
_______________________________________________
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel