diff options
author | claudiob <claudiob@inventati.org> | 2016-10-21 22:48:14 -0700 |
---|---|---|
committer | claudiob <claudiob@inventati.org> | 2016-10-21 22:55:51 -0700 |
commit | fbda46758bdf4b356df468d92f86111b779265cf (patch) | |
tree | 56470681d9455d8d8e3ebfd77d923e07dd550498 /activejob | |
parent | 8447f8d01c3722593ccd345fd7e88be8039ecbf1 (diff) | |
download | rails-fbda46758bdf4b356df468d92f86111b779265cf.tar.gz rails-fbda46758bdf4b356df468d92f86111b779265cf.tar.bz2 rails-fbda46758bdf4b356df468d92f86111b779265cf.zip |
Revert #26826 and add documentation
This reverts commit a01cf703 as explained in the comment to #26826:
Realized that this PR caused the following warning in Travis CI:
```
/home/travis/build/rails/rails/activesupport/lib/active_support/dependencies.rb:293: warning: loading in progress, circular require considered harmful - /home/travis/build/rails/rails/activesupport/lib/active_support/core_ext/hash/indifferent_access.rb
```
Indeed, `active_support/core_ext/hash/indifferent_access.rb` **needs** to require `active_support/hash_with_indifferent_access.rb` in order to access the class `ActiveSupport::HashWithIndifferentAccess`.
The other way around, though, is not _strictly_ required, unless someone tries (like I did in the [gist above](https://gist.github.com/claudiob/43cc7fe77ff95951538af2825a71e5ec)) to use `ActiveSupport::HashWithIndifferentAccess` by only requiring `active_support/hash_with_indifferent_access.rb` without first requiring `active_support/core_ext/hash/indifferent_access.rb`.
I think the solution to this is to revert this PR and instead change the documentation to explicitly state that **developers should not require 'active_support/hash_with_indifferent_access'** if all they want is to use `ActiveSupport::HashWithIndifferentAccess` – instead they should require `active_support/core_ext/hash/indifferent_access.rb`.
Diffstat (limited to 'activejob')
0 files changed, 0 insertions, 0 deletions