Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 8576

Show
Ignore:
Timestamp:
01/06/08 20:28:17 (6 months ago)
Author:
bitsweat
Message:

Simplify and speedup Hash#stringify_keys! References #10717 [Cheah Chu Yeow]

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/activesupport/lib/active_support/core_ext/hash/keys.rb

    r8521 r8576  
    1414        def stringify_keys! 
    1515          keys.each do |key| 
    16             unless key.class.to_s == "String" # weird hack to make the tests run when string_ext_test.rb is also running 
    17               self[key.to_s] = self[key] 
    18               delete(key) 
    19             end 
     16            self[key.to_s] = delete(key) 
    2017          end 
    2118          self