Ticket #381 (closed defect: fixed)
Losing track of a defined constant - possibly related to Module.autoload
| Reported by: | kamal.fariz@… | Owned by: | lsansonetti@… |
|---|---|---|---|
| Priority: | minor | Milestone: | MacRuby 0.5 |
| Component: | MacRuby | Keywords: | autoload require constants |
| Cc: |
Description
There seems to be a bug in the interaction of autoload and requires. I tried hard to reduce this with no success. However, here is the smallest snippet that will illustrate this bug:
$ macruby -rubygems -rrack -r"rack/builder" -e "Rack::Builder" core:in `require:': uninitialized constant Rack::Builder (NameError)
If you remove the require to "rack/builder", MacRuby will autoload Rack::Builder normally and no exception will be raised.
$ macruby -rubygems -rrack -e "Rack::Builder"
in rack.rb, it defines
autoload :Builder, "rack/builder"
Change History
Note: See
TracTickets for help on using
tickets.

