Issue #5690 has been updated by Thomas Sawyer.



I don't think the name is particularly obvious. Nevertheless, I am hopeful that it won't matter. I think `const_get` can accommodate. In fact, I think it can even be made to handle:

  const_get('Foo', 'Bar::Baz')  #=> Foo::Bar::Baz

It is backward compatible, after all.



----------------------------------------
Bug #5690: Module#qualified_const_get
https://bugs.ruby-lang.org/issues/5690

Author: Yehuda Katz
Status: Assigned
Priority: Normal
Assignee: 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/