From: Robert Dober Date: 2008-04-12T00:46:26+09:00 Subject: Re: how to create random object to a particular ruby object ? On Fri, Apr 11, 2008 at 5:24 PM, Robert Klemme wrote: > 2008/4/11, Robert Dober : > > On Fri, Apr 11, 2008 at 4:41 PM, Robert Klemme > > wrote: > > > 2008/4/11, Robert Dober : > > > > > > > I'm not getting the joke here, sorry. Is it somehow related to the > > > original posting mentioning "0" as the sole return value from > > > rand(boolean)? > > > > well I would not consider 0 a boolean, > > And a random sequence of 0's would look funny. :-) > > > > but maybe that was what OP wanted. > > In which case I would have missed the mark because my bit does not > return 0 but true / false. :-) It does indeed, I am in great form today, but at least you understand my surprise now, that you would deliver rand(2) instead of rand(2) == 0, which indeed is a nice way to do the job! Sorry R. > > Kind regards > > > > robert > > -- > use.inject do |as, often| as.you_can - without end > > -- http://ruby-smalltalk.blogspot.com/ --- Whereof one cannot speak, thereof one must be silent. Ludwig Wittgenstein