Commatose
Commatose makes it easy to insert commas into your numbers. Commatose extends the Fixnum, Bignum and Float classes with a new method called "to_sc", which is short for "To string with comma".
The code itself is extremely simple. Here's an example:
1234567.to_sc
>1,234,567
Commatose also allows you to use a character other than a comma to separate the number.
1234567.to_sc(" Chunky bacon! ")
>1 Chunky bacon! 234 Chunky bacon! 567
In addition, you can change the number of digits within each comma separated section.
1234567.to_sc(",", 2)
>1,23,45,67
See the RDoc for more information.