diff options
Diffstat (limited to 'activesupport/lib/misc.rb')
-rw-r--r-- | activesupport/lib/misc.rb | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/activesupport/lib/misc.rb b/activesupport/lib/misc.rb index d2c3d4a045..1ca00db1e7 100644 --- a/activesupport/lib/misc.rb +++ b/activesupport/lib/misc.rb @@ -6,27 +6,3 @@ def silence_warnings $VERBOSE = old_verbose end end - -class Hash - # Return a new hash with all keys converted to symbols. - def symbolize_keys - inject({}) do |options, (key, value)| - options[key.to_sym] = value - options - end - end - - # Destructively convert all keys to symbols. - def symbolize_keys! - keys.each do |key| - unless key.is_a?(Symbol) - self[key.to_sym] = self[key] - delete(key) - end - end - self - end - - alias_method :to_options, :symbolize_keys - alias_method :to_options!, :symbolize_keys! -end |