From: Ray Baxter Date: 2006-06-04T10:17:18+09:00 Subject: Re: Where can one find examples of masterful Ruby code? Alder Green wrote: > For example: check if integer i is a power of 2, with an expression no > more than 13 characters long. > > Solution: (i & (i - 1)) 0 is a power of 2? -- Ray