Ask a Question related to Ruby, Design and Development.
-
dblack@wobblini.net #1
Re: testing argument type and duck typing, newbie question<Pine.LNX.4.44.0311181436090.2202-100000@ool-4355dfae.dyn.optonline.net>
Hi --
On Tue, 18 Nov 2003, gabriele renzi wrote:
Then he'd better avoid Ruby :-)> il Tue, 18 Nov 2003 13:34:32 +0100, Raphael Bauduin
> <raphael.bauduin@be.easynet.net> ha scritto::
>>> >Hi,
> >
> >I have a method taking one argument that can be an integer or a string.
> >How do I test the argument to know if it's a string or an integer? All
> >the duck typing things I've read make me wonder what's the best way
> >to determine if the argument is an integer or a string.....
> you don't want duck typing :)
David
--
David Alan Black
home: [email]dblack@wobblini.net[/email] # New email address
work: [email]blackdav@shu.edu[/email]
Web: [url]http://pirate.shu.edu/~blackdav[/url]
dblack@wobblini.net Guest
-
learning the "Ruby way"<Pine.LNX.4.44.0311201150530.4491-100000@ool-4355dfae.dyn.optonline.net><Pine.LNX.4.44.0311201137580.4435-100000@ool-4355dfae.dyn.optonline.net>
Hi -- On Fri, 21 Nov 2003 dblack@wobblini.net wrote: Just to clarify: "This" means my solution, not your question :-) David -
"stereotyping" (was: Strong Typing (Managing metadata aboutattribute types))<Pine.LNX.4.44.0311171402340.1133-100000@ool-4355dfae.dyn.optonline.net><Pine.LNX.4.44.0311181524130.2236-100000@ool-4355dfae.dyn.optonline.net>
Hi -- On Tue, 18 Nov 2003, Thien Vuong wrote: Class name checking doesn't ensure needed behavior. Actually, let me say first that while I... -
testing argument type and duck typing, newbie question
Hi, I have a method taking one argument that can be an integer or a string. How do I test the argument to know if it's a string or an integer?... -
Prolly a simple question<Pine.LNX.4.44.0310111117330.29007-100000@ool-4355dfae.dyn.optonline.net><Pine.LNX.4.44.0310111103530.28872-100000@ool-4355dfae.dyn.optonline.net>
Whoops, that was a message from March I just replied to. We're getting another wave of old messages. David -- David Alan Black home:... -
Enumerable#inject is surprising me...<Pine.LNX.4.44.0310082145050.20002-100000@ool-4355dfae.dyn.optonline.net><Pine.LNX.4.44.0310082132090.19888-100000@ool-4355dfae.dyn.optonline.net>
On Thu, 9 Oct 2003 dblack@superlink.net wrote: Whoops, I mean how it gets into the second one at all. David -- David Alan Black



Reply With Quote

