[MacRuby-devel] [MacRuby] #182: The constant lookup in MacRuby does not behave correctly
MacRuby
ruby-noreply at macosforge.org
Fri Dec 19 16:23:01 PST 2008
#182: The constant lookup in MacRuby does not behave correctly
----------------------------------------+-----------------------------------
Reporter: vincent.isambart@… | Owner: lsansonetti@…
Type: defect | Status: new
Priority: major | Milestone:
Component: MacRuby | Keywords:
----------------------------------------+-----------------------------------
Comment(by vincent.isambart@…):
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/>
More information about the MacRuby-devel
mailing list