I know how to generate a random number between 1 and 2 :

def random
 return (1 + rand(2))
end

but let's say  I would like to return 1 in 80% of the calls and 2 in
20% of the call...
which library should I use ?  ( I've seen a lot at http://raa.ruby-lang.org/
)

thanks for your suggestions

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to