What is the difference between "Module#const_get" with inheritance lookup versus directly accessing a constant via "::"?
Correct! Well done.
Incorrect.
The correct answer is B) const_get by default also searches ancestors (included modules and superclasses) for the constant, similar to normal constant lookup, while a second boolean argument can disable ancestor search, giving finer control than "::" syntax
Correct Answer
const_get by default also searches ancestors (included modules and superclasses) for the constant, similar to normal constant lookup, while a second boolean argument can disable ancestor search, giving finer control than "::" syntax
const_get(name, inherit = true) by default follows the normal constant resolution including ancestors; passing false restricts the search to the receiver itself, offering programmatic control not directly expressible with "::" syntax.