>>>>> "S" == Simon Strandgaard <neoneye / adslhome.dk> writes:

S>     raise TypeError, "cannot convert #{n.class} to Integer" unless n.kind_of?
S> (Integer)

svg% ruby -e 'class A; def to_int() 2 end; end; p [1,2,3].first(A.new)'
[1, 2]
svg% 


Guy Decoux