irb(main):001:0> %w(a b c).first(:xyz)
=> ["a", "b", "c"]
irb(main):002:0> %w(a b c).last(:xyz)
=> ["a", "b", "c"]
This seems inconsistent to me. I would expect a TypeError.
···
--
Simon Strandgaard
irb(main):001:0> %w(a b c).first(:xyz)
=> ["a", "b", "c"]
irb(main):002:0> %w(a b c).last(:xyz)
=> ["a", "b", "c"]
This seems inconsistent to me. I would expect a TypeError.
--
Simon Strandgaard
irb(main):001:0> %w(a b c).first(:xyz)
svg% ruby -we '%w(a b c).first(:xyz)'
-e:1: warning: treating Symbol as an integer
svg%
Guy Decoux
Ah.. I see. You have good insight. Thanks.
On Sunday 24 October 2004 15:25, ts wrote:
ruby -we '%w(a b c).first(:xyz)'
--
Simon Strandgaard