From: "F. Senault" Date: 2007-11-28T05:40:00+09:00 Subject: Re: Most elegant way to do this? Le 27 novembre � 01:17, rbysamppi@gmail.com a �crit : > Are there any more elegant, concise, pithy, and more Rubyish ways of > doing this? Well, in the (maybe too) rubyish ways to do it, I kinda like : class Fixnum def dice(faces = 6) r = self self.times { r += rand(faces) } r end end If you feel even more adventurous, you can even rename it 'd', to approach the role playing games notation with, for instance, 3.d(100)+8... :) Fred -- Every finger in the room is pointing at me I wanna spit in their faces Then I get afraid of what that could bring I got a bowling ball in my stomach I got a desert in my mouth Figures that my courage would choose to sell out now (Tori Amos, Crucify)