mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
01c9782fa2
load_missing_constant is a private method that basically plays the role of const_missing. This method has an error condition that is surprising: it raises if the class or module already has the missing constant. How is it possible that if the class of module has the constant Ruby has called const_missing in the first place? The answer is that the from_mod argument is self except for anonymous modules, because const_missing passes down Object in such case (see the comment in the source code of the patch for the rationale). But then, it is better to pass down Object *if Object is also missing the constant* and otherwise err with an informative message right away. |
||
---|---|---|
.. | ||
autoloading_fixtures | ||
core_ext | ||
dependencies | ||
deprecation | ||
fixtures | ||
json | ||
notifications | ||
testing | ||
xml_mini | ||
abstract_unit.rb | ||
autoload_test.rb | ||
benchmarkable_test.rb | ||
broadcast_logger_test.rb | ||
caching_test.rb | ||
callback_inheritance_test.rb | ||
callbacks_test.rb | ||
class_cache_test.rb | ||
clean_backtrace_test.rb | ||
clean_logger_test.rb | ||
concern_test.rb | ||
configurable_test.rb | ||
constantize_test_cases.rb | ||
dependencies_test.rb | ||
dependencies_test_helpers.rb | ||
deprecation_test.rb | ||
descendants_tracker_test_cases.rb | ||
descendants_tracker_with_autoloading_test.rb | ||
descendants_tracker_without_autoloading_test.rb | ||
empty_bool.rb | ||
file_update_checker_test.rb | ||
gzip_test.rb | ||
i18n_test.rb | ||
inflector_test.rb | ||
inflector_test_cases.rb | ||
key_generator_test.rb | ||
lazy_load_hooks_test.rb | ||
load_paths_test.rb | ||
log_subscriber_test.rb | ||
logger_test.rb | ||
message_encryptor_test.rb | ||
message_verifier_test.rb | ||
multibyte_chars_test.rb | ||
multibyte_conformance.rb | ||
multibyte_test_helpers.rb | ||
multibyte_unicode_database_test.rb | ||
notifications_test.rb | ||
number_helper_i18n_test.rb | ||
number_helper_test.rb | ||
option_merger_test.rb | ||
ordered_hash_test.rb | ||
ordered_options_test.rb | ||
rescuable_test.rb | ||
safe_buffer_test.rb | ||
string_inquirer_test.rb | ||
subscriber_test.rb | ||
tagged_logging_test.rb | ||
test_test.rb | ||
time_zone_test.rb | ||
transliterate_test.rb | ||
xml_mini_test.rb |