I am seeing some unexpected (to me) behavior when trying to access a constant from another module. Wondering if this is normal/expected or if it is a bug?
When I use the assigned name to a module to access its constant, the code fails to compile, but if I use the name of the module itself, the code compiles fine. I don’t have this problem when accessing methods from a module.
I am using
module AwesomeRoutes Uf = UtilFuncs ## another module (assigning a short name to it) get "/coolfeatures/crystallang" do |env| dirname = Uf::FIGS_DIR ## fails to compile dirname = UtilFuncs::FIGS_DIR ## compiles without error someaction = Uf::takeaction(a,b,c) ## no compilation error for methods end end