From: matz@... (Yukihiro Matsumoto) Date: 2004-02-16T15:33:59+09:00 Subject: Re: Hash#values_at Hi, In message "Hash#values_at" on 04/02/16, "Ara.T.Howard" writes: | |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? def values_at(*args) args.collect do |i| self[i] end end matz.