From: Robert Dober Date: 2008-09-02T21:08:57+09:00 Subject: Re: Does this seem useful for you? On Tue, Sep 2, 2008 at 1:04 PM, Jens Wille wrote: >> "abcd".map_messages( [ :[], 1, 2], :size ) > done. more or less ;-) i kept hashes, since i sometimes like 'em > better. would you prefer === over is_a? in this case? if so, why? Although is_a? is more readable the #=== operator is a very powerful concept of ruby, using it and thus understanding its semantics allows us to use/understand case statements more efficiently, a problem that frequently comes up with nubies. I guess most people prefer this code case args.first when String, Symbol ... when Enumerable ... end to if args.first.is_a?( String ) || ... ... elsif args.first.is_a?( Enumerable ) end Somehow I feel therefore the use of Class#=== preferable to Object#is_a? but I would not argue with people using is_a? ;). R.