From: "Ara.T.Howard" Date: 2004-02-16T15:24:55+09:00 Subject: Hash#values_at what is the rational behind this? ({}.values_at :a).empty? #=> false i would expect ({}.values_at :a) #=> nil or ({}.values_at :a) #=> [] but not the actual ({}.values_at :a) #=> [nil] there must be some reason for this, but i cannot see why returning an 'array full of nothing' is preferable to returning an 'emtpy array'... is there some way of thinking about this that will make it seem less suprising? -a -- =============================================================================== | EMAIL :: Ara [dot] T [dot] Howard [at] noaa [dot] gov | PHONE :: 303.497.6469 | ADDRESS :: E/GC2 325 Broadway, Boulder, CO 80305-3328 | URL :: http://www.ngdc.noaa.gov/stp/ | TRY :: for l in ruby perl;do $l -e "print \"\x3a\x2d\x29\x0a\"";done ===============================================================================