diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2011-03-05 20:01:06 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2011-03-05 20:01:06 -0800 |
commit | 09d3e89cf0b3e7be03f97739e297fd40ebba1178 (patch) | |
tree | 43b0ba8752affb7622023e6a60775cfca1027b39 /activesupport/lib/active_support | |
parent | 74818a35432b40fef16fe74f248ea75d35405324 (diff) | |
download | rails-09d3e89cf0b3e7be03f97739e297fd40ebba1178.tar.gz rails-09d3e89cf0b3e7be03f97739e297fd40ebba1178.tar.bz2 rails-09d3e89cf0b3e7be03f97739e297fd40ebba1178.zip |
use sort_by instead of sort()
Diffstat (limited to 'activesupport/lib/active_support')
-rw-r--r-- | activesupport/lib/active_support/cache.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/cache.rb b/activesupport/lib/active_support/cache.rb index b4f0c42e37..ddb7a315e2 100644 --- a/activesupport/lib/active_support/cache.rb +++ b/activesupport/lib/active_support/cache.rb @@ -493,7 +493,7 @@ module ActiveSupport key.first.to_param end elsif key.is_a?(Hash) - key = key.to_a.sort{|a,b| a.first.to_s <=> b.first.to_s}.collect{|k,v| "#{k}=#{v}"}.to_param + key = key.to_a.sort_by { |x| x.first.to_s }.collect{|k,v| "#{k}=#{v}"}.to_param else key = key.to_param end |