Fix that eager loading of polymorphic associations did not work with association empty?/any? predicates any more (there is still a problem when select is applied to a relation, or if you try association#exists? -- but its easier to work around)
Revert "Used Yield instead of block.call" -- this causes all of atom_feed_helper_test.rb to fail with "SystemStackError: stack level too deep".

This reverts commit d3a1ce1cdc60d593de1682c5f4e3230c8db9a0fd.
Improved compatibility with the stdlib JSON gem.

Previously, calling `::JSON.{generate,dump}` sometimes causes
unexpected failures such as intridea/multi_json#86.

`::JSON.{generate,dump}` now bypasses the ActiveSupport JSON encoder
completely and yields the same result with or without ActiveSupport.
This means that it will **not** call `as_json` and will ignore any
options that the JSON gem does not natively understand. To invoke
ActiveSupport's JSON encoder instead, use `obj.to_json(options)` or
`ActiveSupport::JSON.encode(obj, options)`.
Merge pull request #12862 from chancancode/json_gem_compat

JSON gem compatibility
Set branch for arel in Gemfile so that we can use bundle local config [ci skip]
Fix AR Changelog examples and improve syntax highlight [ci skip]
Fix test name [ci skip]
Avoid creation of extra hash with merge just to set a value
Simplify number parsing logic in numericality validation
Use a simple conditional rather than short circuit with next
Avoid a new hash allocation
Make code simpler to read by using a case statement
Cache regexp source on format validation to avoid allocating new objects

Example:

    >> r = /some-regexp/
    => /some-regexp/
    >> r.source.object_id == r.source.object_id
    => false
Remove argument that is accessible as attribute
Only check that the option exists once instead of doing on each conditional
Invert conditional to avoid double checking for Regexp
Remove short circuit return in favor of simple conditional
Allocate one less object using html_safe during content_tag construction
document id prefixed String usage of `.find`. refs #12891 [ci skip]
Take Hash with options inside Array in #url_for