[#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:00999] Re: a question about to_i
From:
"Conrad Schneiker" <schneiker@...>
Date:
1999-12-19 20:08:53 UTC
List:
ruby-talk #999
----- Original Message ----- From: Conrad Schneiker <schneiker@jump.net> To: ruby-talk ML <ruby-talk@netlab.co.jp> Sent: Sunday, December 19, 1999 1:18 PM Subject: [ruby-talk:00998] Re: a question about to_i > ----- Original Message ----- > From: Yukihiro Matsumoto <matz@netlab.co.jp> > To: ruby-talk ML <ruby-talk@netlab.co.jp> > Sent: Sunday, December 19, 1999 10:18 AM > Subject: [ruby-talk:00996] Re: a question about to_i .... > > In message "[ruby-talk:00989] a question about to_i" > > on 99/12/19, Friedrich Dominicus <Friedrich.Dominicus@inka.de> writes: > > > > |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 can prepare exception raising version of the conversion method, but > > we have to decide following: > > > > * the name of the method .... > Unless there are very strong arguments to the contrary, I'd recommend that > the *non-exception-raising* version get the *new* name, and that the current > version should raise an exception for non-numeric data. > > This has the twin advantage of following the "principle of least surprise" > and the "principle of greatest default safety/reliability". These are > important considerations for new Ruby users, for the use of Ruby in large > and important projects, and for most easily documenting and teaching Ruby. It would also be helpful if the error message for the exception would also tell you what method to use if you wanted non-numerics silently mapped into a 0 (zero) without an exception.