From: Simon Strandgaard <0bz63fz3m1qt3001@...> Date: 2003-07-16T01:58:13+09:00 Subject: Re: How to reduce Ruby runtime error? On Wed, 16 Jul 2003 02:20:49 +0900, Hal E. Fulton wrote: > ----- Original Message ----- > From: "Xiangrong Fang" > To: "ruby-talk ML" > Sent: Tuesday, July 15, 2003 11:05 AM > Subject: How to reduce Ruby runtime error? > > >> Hi my friends, >> >> I am thinking of how can I reduce Ruby runtime error. Not like >> languages such as C or Pascal, Ruby is typeless. This is a good thing, >> especially in design time. However, I found that my application is not >> stable due to this feature. >> >> For example, a routine is expecting a string, and this string turned out >> to be nil at runtime, an error occurred. In Delphi, for example, it is >> impossible that a string becomes a nil, it will be an empty string. >> >> How can I better utilize Ruby's typeless feature yet avoid such anonying >> runtime problem? [snip] > I'm sure there are other ways. Unittesting can help you early-catching such situations. My AEditor project uses unittesting, status at this moment: 336 tests, 1161 assertions, 0 failures, 0 errors http://raa.ruby-lang.org/list.rhtml?name=aeditor I am myself using Rubyunit. Instead I recommend Test::Unit. -- Simon Strandgaard