[prev in list] [next in list] [prev in thread] [next in thread]
List: ruby-talk
Subject: Re: Newer to Ruby
From: Caleb Tennis <caleb () aei-tech ! com>
Date: 2005-12-07 21:00:31
Message-ID: 200512071600.20747.caleb () aei-tech ! com
[Download RAW message or body]
> >> digits = [rand(7)] + Array.new(8) { rand(10) }
>
> => [5, 6, 1, 2, 5, 4, 7, 1, 1]
I was thinking:
( [rand(6)+1] + Array.new(8) { rand(10) }).to_s.to_i
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic