[#955] Ruby 1.4.3 — Yukihiro Matsumoto <matz@...>
Ruby 1.4.3 is out, check out:
1 message
1999/12/07
[#961] Ruby compileable by C++ compiler? — Clemens Hintze <c.hintze@...>
Hi,
8 messages
1999/12/10
[#962] Re: Ruby compileable by C++ compiler?
— matz@... (Yukihiro Matsumoto)
1999/12/10
Hi,
[#963] Re: Ruby compileable by C++ compiler?
— Clemens Hintze <clemens.hintze@...>
1999/12/10
Wei,
[#964] Bastion or SecurityManager for Ruby? — Clemens Hintze <clemens.hintze@...>
Hi,
15 messages
1999/12/10
[#966] Re: Bastion or SecurityManager for Ruby?
— nakajima kengo<ringo@...>
1999/12/10
Hello Clemens,
[#967] Re: Bastion or SecurityManager for Ruby?
— matz@... (Yukihiro Matsumoto)
1999/12/10
Hi,
[#989] a question about to_i — Friedrich Dominicus <Friedrich.Dominicus@...>
Sorry, I'm quite new to ruby. But I encounterd the following problem. If
17 messages
1999/12/19
[ruby-talk:00991] Re: a question about to_i
From:
Friedrich Dominicus <Friedrich.Dominicus@...>
Date:
1999-12-19 08:14:35 UTC
List:
ruby-talk #991
Yasushi Shoji wrote: > > From: Friedrich Dominicus <Friedrich.Dominicus@inka.de> > Subject: [ruby-talk:00989] a question about to_i > Date: Sun, 19 Dec 1999 08:42:44 +0100 > > > Sorry, I'm quite new to ruby. But I encounterd the following problem. If > > I have a string "bla" and apply to_i to it I get 0. This seems to be > > quite strange because it is what it is a string so shouldn't an > > exeception be rissen or s.th simular. > > I think that's because if exception is rissen you can't do like > following > > s = 'whatever' > t = '0492' > u = 123 > > print s.to_i + t.to_i + u, "\n" Now that is not a reason for me what about print s.to_i * t.to_i + u, "\n" then it will give me 0 anyway, but that won't help much and what about print t.to_i / s.to_i? > > this gives you 615 no matter what s is > > > And how do you check if a string is a number then? > > so i guess you don't need any check. but not sure that's what you want. I need this check not in my example but I found it scary to just accept that any String will turn into integer zero. Regards Friedrich