From b57634fcbdab7526965a0b05b39f55ef76451cc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lourens=20Naud=C3=A9?= Date: Sun, 7 Feb 2010 23:20:37 +0000 Subject: [PATCH] Hash#symbolize_keys(!) optimizations --- .../lib/active_support/core_ext/hash/keys.rb | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/activesupport/lib/active_support/core_ext/hash/keys.rb b/activesupport/lib/active_support/core_ext/hash/keys.rb index 045a694..62990f7 100644 --- a/activesupport/lib/active_support/core_ext/hash/keys.rb +++ b/activesupport/lib/active_support/core_ext/hash/keys.rb @@ -22,7 +22,7 @@ class Hash # to +to_sym+. def symbolize_keys! keys.each do |key| - self[(key.to_sym rescue key) || key] = delete(key) + self[key.to_sym] = delete(key) if key.respond_to?(:to_sym) end self end -- 1.6.4.4