2012/10/25 Charles Hixson <charleshixsn / earthlink.net>:
> In Ruby1.9 is there any good way to count the number of on bits in an
> integer (after an & operation)?

number.to_s(2).count('1')? I'm not sure how fast this is going to be,
but might turn out to be faster than a simple while loop.

-- Matma Rex