From: Adam Prescott Date: 2010-09-06T08:46:02+09:00 Subject: Re: Is my code unelegant? One immediate modification would be to replace the final two lines of your roman_numerals() method with: ('M' * number_of_m) + ('D' * number_of_d) + ('C' * number_of_c) + ('L' * number_of_l) + ('X' * number_of_x) + ('V' * number_of_v) + ('I' * number_of_i) since the method will return that without the need for an explicit return statement. You'll notice that there is no puts in this, either. Your method should return a string. Creating the roman numeral version of the given number is a separate concern to actually printing that number. You're better off then using puts roman_numerals(argument). Just looking at it, I see nothing which restricts the input to between 1 and 3000. On Sun, Sep 5, 2010 at 10:52 PM, Mark Walker wrote: > > I should add that the point of this program is to have a user enter a > number between 1 and 3000 and it will convert it to Old Roman Numerals. > -- > Posted via http://www.ruby-forum.com/. >