#75 new
dan (at zeraweb)

app::Helpers::Default bug

Reported by dan (at zeraweb) | August 8th, 2008 @ 08:01 PM | in 0.8.1 - I Heard There Was a Secret Chord

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.

No comments found

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.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Resource-oriented Web apps.

People watching this ticket

Pages