Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

app::Helpers::Default bug

#75

This appears to be a problem with Ruby's support for dynamically loading constants. From the group:


What basically happens apparently is that const_defined? cannot always "see" consts that are loaded dynamically if the const name can be resolved outside of the module. I had a similar problem with const_get, where it would return consts outside the module (which is why the Module bracket operator now uses eval).

This manifested itself by ignoring the default helper auto-load declaration in the MVC Layer. More precisely, it actually successfully loads the helpers/default.rb code if you provide it, but const_defined? incorrectly reports that :Default is still undefined, because it is somehow "shadowed" by Waves::Helpers::Default. Weird. Thus AutoCode goes ahead and auto-creates it.

If you use a name that is not shadowed, everything works fine. I have not tried to reproduce the problem on a more limited scale because I first wanted to see if the bug was still there in 1.87 or JRuby. Along the way, as I mentioned, RubyGems got confused and now claims it can't find any of my gems. Argh.


It turns out that the same behavior is exhibited in 1.8.7.

Reported by dan (at zeraweb) · August 8th, 2008 @ 08:01 PM

State: new
Assigned to: dan (at zeraweb) dan (at zeraweb)

Activity

No comments yet.

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.