2008/9/20 James Coglan <jcoglan / googlemail.com>:
> def roll(n,s)
>  (1..n).map { |x| "#{x}|#{'#' * (1 + rand(s))}" } * "\n"
> end
>
> puts roll(20,4)

I don't think that your method rolls the dice s times.

def roll(n, s)
  a=(1..n).map{|x|"#{x}|"};s.times{a[rand(n)]<<?#};puts a
end

Regards,
Pit