rails/rails — pull request #12644 by tmacedo (2013-10-25 13:46:52+00:00)
Title: Merging Active Supports' to_param and to_query in a single core_ext

They had an undeclared circular dependency where Hash#to_param wouldn't
work unless the to_query extension was also loaded and to_query was
already requiring to_param.

ToParamTest#test_hash can reproduce the issue.

An alternative solution would be to create an extra class/mixin where the required shared behaviour would be defined.