1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activesupport/test
Jean Boussier 11e05defec Fix constantize edge case involving prepend, autoloading and name conflicts
In the following situation:

```ruby
class Bar
end

module Baz
end

class Foo
  prepend Baz
end

class Foo::Bar
end
```

Running `Inflector.constantize('Foo::Bar')` would blow up with a NameError.

What is happening is that `constatize` was written before the introduction
of prepend, and wrongly assume that `klass.ancestors.first == klass`.

So it uses `klass.ancestors.inject` without arguments, as a result
a prepended module is used in place of the actual class.
2016-12-14 14:25:43 +01:00
..
autoloading_fixtures Fix constantize edge case involving prepend, autoloading and name conflicts 2016-12-14 14:25:43 +01:00
core_ext change return value of duplicable? with Ruby 2.4+ 2016-12-13 07:35:36 +09:00
dependencies normalizes indentation and whitespace across the project 2016-08-06 20:16:27 +02:00
deprecation modernizes hash syntax in activesupport 2016-08-06 19:38:33 +02:00
file_fixtures introduce ActiveSupport::Testing::FileFixtures. 2015-01-28 12:29:34 +01:00
fixtures normalizes indentation and whitespace across the project 2016-08-06 20:16:27 +02:00
json Fix typo in constant reference 2016-11-13 15:59:13 +00:00
notifications Add more rubocop rules about whitespaces 2016-10-29 01:17:49 -02:00
testing applies new string literal convention in activesupport/test 2016-08-06 18:10:53 +02:00
xml_mini ✂️ needless lines beneath private. 2016-11-20 17:58:36 +01:00
abstract_unit.rb applies new string literal convention in activesupport/test 2016-08-06 18:10:53 +02:00
array_inquirer_test.rb applies new string literal convention in activesupport/test 2016-08-06 18:10:53 +02:00
autoload_test.rb improve error message when include assertions fail 2016-09-16 12:03:37 -07:00
benchmarkable_test.rb Add three new rubocop rules 2016-08-16 04:30:11 -03:00
broadcast_logger_test.rb Merge pull request #26874 from tgxworld/fix_broadcast_logger 2016-11-25 15:57:50 +10:30
caching_test.rb fix new warning in ruby 2.4 2016-12-14 08:58:39 +09:00
callback_inheritance_test.rb Add three new rubocop rules 2016-08-16 04:30:11 -03:00
callbacks_test.rb Add more rubocop rules about whitespaces 2016-10-29 01:17:49 -02:00
class_cache_test.rb applies new string literal convention in activesupport/test 2016-08-06 18:10:53 +02:00
clean_backtrace_test.rb applies remaining conventions across the project 2016-08-06 20:20:22 +02:00
clean_logger_test.rb applies new string literal convention in activesupport/test 2016-08-06 18:10:53 +02:00
concern_test.rb use public Module#include instead of send :include 2016-11-27 22:20:52 +09:00
configurable_test.rb improve error message when include assertions fail 2016-09-16 12:03:37 -07:00
constantize_test_cases.rb Fix constantize edge case involving prepend, autoloading and name conflicts 2016-12-14 14:25:43 +01:00
dependencies_test.rb Add more rubocop rules about whitespaces 2016-10-29 01:17:49 -02:00
dependencies_test_helpers.rb normalizes indentation and whitespace across the project 2016-08-06 20:16:27 +02:00
deprecation_test.rb Add more rubocop rules about whitespaces 2016-10-29 01:17:49 -02:00
descendants_tracker_test_cases.rb normalizes indentation and whitespace across the project 2016-08-06 20:16:27 +02:00
descendants_tracker_with_autoloading_test.rb applies new string literal convention in activesupport/test 2016-08-06 18:10:53 +02:00
descendants_tracker_without_autoloading_test.rb applies new string literal convention in activesupport/test 2016-08-06 18:10:53 +02:00
evented_file_update_checker_test.rb Merge pull request #26830 from headius/mask_forking_fsevent_test_on_jruby 2016-10-20 10:42:50 -03:00
executor_test.rb Skip test that depends on RubyVM when it is not available (JRuby). 2016-10-21 14:36:51 -05:00
file_update_checker_shared_tests.rb Merge pull request #26829 from headius/wait_for_events_in_listen_tests 2016-10-19 15:00:38 -07:00
file_update_checker_test.rb applies new string literal convention in activesupport/test 2016-08-06 18:10:53 +02:00
gzip_test.rb Add more rubocop rules about whitespaces 2016-10-29 01:17:49 -02:00
i18n_test.rb modernizes hash syntax in activesupport 2016-08-06 19:38:33 +02:00
inflector_test.rb Remove deprecated separator argument from parameterize 2016-11-14 12:14:23 +00:00
inflector_test_cases.rb Add more rubocop rules about whitespaces 2016-10-29 01:17:49 -02:00
key_generator_test.rb normalizes indentation and whitespace across the project 2016-08-06 20:16:27 +02:00
lazy_load_hooks_test.rb normalizes indentation and whitespace across the project 2016-08-06 20:16:27 +02:00
log_subscriber_test.rb applies new string literal convention in activesupport/test 2016-08-06 18:10:53 +02:00
logger_test.rb improve error message when include assertions fail 2016-09-16 12:03:37 -07:00
message_encryptor_test.rb Add more rubocop rules about whitespaces 2016-10-29 01:17:49 -02:00
message_verifier_test.rb applies remaining conventions across the project 2016-08-06 20:20:22 +02:00
multibyte_chars_test.rb Add more rubocop rules about whitespaces 2016-10-29 01:17:49 -02:00
multibyte_conformance_test.rb Add three new rubocop rules 2016-08-16 04:30:11 -03:00
multibyte_grapheme_break_conformance_test.rb fixes remaining RuboCop issues [Vipul A M, Xavier Noria] 2016-09-01 23:41:49 +02:00
multibyte_normalization_conformance_test.rb fixes remaining RuboCop issues [Vipul A M, Xavier Noria] 2016-09-01 23:41:49 +02:00
multibyte_proxy_test.rb applies new string literal convention in activesupport/test 2016-08-06 18:10:53 +02:00
multibyte_test_helpers.rb Add more rubocop rules about whitespaces 2016-10-29 01:17:49 -02:00
multibyte_unicode_database_test.rb Add Style/EmptyLines in .rubocop.yml and remove extra empty lines 2016-08-07 17:50:59 +09:00
notifications_test.rb Add three new rubocop rules 2016-08-16 04:30:11 -03:00
number_helper_i18n_test.rb Add three new rubocop rules 2016-08-16 04:30:11 -03:00
number_helper_test.rb Remove deprecated :prefix option 2016-11-13 23:09:03 +00:00
option_merger_test.rb Add three new rubocop rules 2016-08-16 04:30:11 -03:00
ordered_hash_test.rb Add more rubocop rules about whitespaces 2016-10-29 01:17:49 -02:00
ordered_options_test.rb applies new string literal convention in activesupport/test 2016-08-06 18:10:53 +02:00
reloader_test.rb Add three new rubocop rules 2016-08-16 04:30:11 -03:00
rescuable_test.rb Call fallback exception handlers with the right exception 2016-11-17 14:50:41 -05:00
safe_buffer_test.rb Add more rubocop rules about whitespaces 2016-10-29 01:17:49 -02:00
security_utils_test.rb applies new string literal convention in activesupport/test 2016-08-06 18:10:53 +02:00
share_lock_test.rb Add three new rubocop rules 2016-08-16 04:30:11 -03:00
string_inquirer_test.rb applies new string literal convention in activesupport/test 2016-08-06 18:10:53 +02:00
subscriber_test.rb normalizes indentation and whitespace across the project 2016-08-06 20:16:27 +02:00
tagged_logging_test.rb applies new string literal convention in activesupport/test 2016-08-06 18:10:53 +02:00
test_case_test.rb use message that specified in argument to error message 2016-08-31 08:52:23 +09:00
time_travel_test.rb applies new string literal convention in activesupport/test 2016-08-06 18:10:53 +02:00
time_zone_test.rb Add more rubocop rules about whitespaces 2016-10-29 01:17:49 -02:00
time_zone_test_helpers.rb applies new string literal convention in activesupport/test 2016-08-06 18:10:53 +02:00
transliterate_test.rb Add three new rubocop rules 2016-08-16 04:30:11 -03:00
xml_mini_test.rb Add more rubocop rules about whitespaces 2016-10-29 01:17:49 -02:00