7stud -- wrote:

> class Fixnum
>   def a(num)
>     return sprintf("%s%s", self, num)
>   end
> end
> 
> x = 3
> y = 4
> puts x.a(y)
> 
> --output:--
> 34


thanks.  or this one works too:

p (1..10).inject{|x,y| "#{x}#{y}"}
-- 
Posted via http://www.ruby-forum.com/.