Merge pull request #10785 from senny/10782_routes_inspector_deals_with_controller_regexp

`RoutesInspector` deals with routes using regexp as `:controller` option
Fix regression in has_secure_password.

If the confirmation was blank, but the password wasn't, it would still save.
rewrites AR's reload documentation

* It is no longer true that options are passed to find.

* Documents that ActiveRecord::RecordNotFound may be raised.

* Documents that the reload happens in-place.

* Documents that caches are wiped.

* Documents that the method returns self.

* Documents a couple of use cases.
revises the documentation of ActiveRecord::Relation#find_or_create_by [ci skip]

* Inspect uses double quotes.

* Inspect puts a hash as in #<User ...>.

* Documents the return value, and makes explicit it can be an invalid record.

* Documents the method is not atomic.

* Documents a way to handle UNIQUE contraint violations in the event of a race condition.

* Removes the "Examples" header according to our guidelines.
Allow Date to be compared with Time (like it was possible to compare Time with Date)
Revert "Merge pull request #4490 from EmmanuelOga/master"

This behaviour doesn't actually make sense, the context of
the child should not be affected by the parent. See #10492.

This reverts commit 5f8274efe128ffeec8fa3179460f5167a078f007, reversing
changes made to 81e837e810460d066a2e5fc5a795366ec8ab2313.
The behavior we had in place in rc1 was actually to convert to DateTime and use <=> from there. Restore that.
Merge branch '4-0-stable' of github.com:rails/rails into 4-0-stable
Merge branch 'fix-hwia' into 4-0-0
Replace comment about Sprockets stub directive with a link to README about all directives

Conflicts:
	railties/lib/rails/generators/rails/app/templates/app/assets/javascripts/application.js.tt
	railties/lib/rails/generators/rails/plugin_new/templates/rails/javascripts.js
adding a test for #10830

Conflicts:
	activerecord/test/cases/adapters/postgresql/bytea_test.rb
the typecast value should be passed to the serializer.  fixes #10830
Fix #10789. Now at last ::Logger doesn't support #silence method .
only check pending migrations if there are new files
Merge pull request #10482 from scudco/10432-fix-add-column-with-array

Fixes #10432 add_column not creating array columns in PostgreSQL
Conflicts:
	activerecord/CHANGELOG.md
Merge pull request #10850 from arunagw/build_fix_null_migration

Need to pass parameters
Merge pull request #10851 from arunagw/fixing_build_pending_migration

Fixing build for not checking migration
Unused variable warning removed
Merge pull request #10861 from arunagw/unused_var_removed

Unused variable warning removed
clearing autoloaded constants triggers routes reloading [Fixes #10685]