From: Tobias Reif Date: 2002-04-03T19:20:09+09:00 Subject: Re: rcr Paul Duncan wrote: > class Array > def rand > raise RuntimeError, 'Array#rand(): empty array' unless length > 0 > at Kernel::rand(length).floor > end > end or class Array def any if empty? nil else self[rand length] end end end random_character = ('a'..'z').to_a.any puts random_character Tobi -- Neither simple nor complex matters are to be complicated.