Issue #5690 has been updated by marcandre (Marc-Andre Lafortune).


Cool slide :-)

+1 from me, but modifying existing `const_get`. No incompatibility as "Foo::Bar" are currently invalid constant names. And `const_set` should be modified as well (raises a Name if the path up to the last constant name does not exist or is not a Module/Class).
----------------------------------------
Bug #5690: Module#qualified_const_get
https://bugs.ruby-lang.org/issues/5690#change-27605

Author: wycats (Yehuda Katz)
Status: Assigned
Priority: Normal
Assignee: matz (Yukihiro Matsumoto)
Category: core
Target version: 2.0.0
ruby -v: -


It would be great if there was a way to dynamically load a constant path:

  module Foo
    module Bar
      module Baz
      end
    end
  end

  Foo.qualified_const_get("Bar::Baz") => Foo::Bar::Baz


-- 
http://bugs.ruby-lang.org/