From: Cliff Rosson Date: 2013-03-30T01:54:27+09:00 Subject: Re: Ruby Typing? --e89a8ffbae4dbc2bcc04d9131f5a Content-Type: text/plain; charset=ISO-8859-1 and x.kind_of?(Fixnum) in addition to Adam's points On Fri, Mar 29, 2013 at 9:47 AM, Adam Prescott wrote: > You could also try x.to_int + y.to_int and use respond_to?(:to_int) > for detection. Equally with #to_ary. Duck typing! > > -- vizualize.me/cliffrosson --e89a8ffbae4dbc2bcc04d9131f5a Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
and x.kind_of?(Fixnum) in addition to Adam's points


On Fri, Ma= r 29, 2013 at 9:47 AM, Adam Prescott <adam@aprescott.com> w= rote:
You could also try x.to_int + y.to_int and u= se respond_to?(:to_int)
for detection. Equally with #to_ary. Duck typing!




--
vizualize.me/cliffro= sson
--e89a8ffbae4dbc2bcc04d9131f5a--