From: Pit Capitain Date: 2008-09-21T02:27:09+09:00 Subject: Re: One-Liners Mashup (#177 again) 2008/9/20 James Coglan : > 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)]<