Core Class Changes: Hash

Technical documentation
02/24/2008

General Changes

  • Removed some redundant and/or unnecessary code.
  • TODO: Add support for hash slices.

Specific Changes

Hash#[]
  • TODO: Add support for hash slices.
Hash#[]=
  • TODO: Add support for hash slices.
Hash#clear
  • Minor optimization for empty arrays.
Hash#each_pair
  • Now a true alias of Hash#each instead of a synonym.
Hash#fetch
  • TODO: Remove the block form.
Hash#include?
  • Removed. There were too many aliases. Only the Hash#key? alias remains. I also found this particular alias confusing, because I could never remember if it referred to keys, values or both.
Hash#key?
  • Now a true alias of Hash#has_key? instead of a synonym.
Hash#indexes
  • Removed, deprecated.
Hash#indices
  • Removed, deprecated.
Hash#member?
  • Removed. There were too many aliases. Only the Hash#key? alias remains.
Hash#select
  • Changed the argc prototype from -1 to 0 and removed an unnecessary argc check.
Hash#size
  • Now a true alias of Hash#length instead of a synomym.
Hash#store
  • Now a true alias of Hash#[]= instead of a synomym.
Hash#update
  • Now a true alias of Hash#merge! instead of a synomym.

Files