Working with Ruby
Hi, I am Jan. This is my old Ruby blog. I still post about Ruby, but I now do it on idiosyncratic-ruby.com. You should also install Irbtools to improve your IRB.

Storing an array of indices in an integer

Sometimes you have an array of indices. These might, for example, act as flags, whether some specific options are set or not. A nice way to store this list is, to store it in one single number.

…read

Ruby