fixnum

Ruby Integer and Fixnum unexpexted behavior

I want to use gcd function of the Integer class. Using the example from Ruby Doc as a test it fails: irb(main):001:0> 72.gcd 168 NoMethodError: undefined method `gcd' for 72:Fixnum from (irb):1 I have the windows one click installer ruby 1.8.6 (2008-08-11 patchlevel 287) [i386-mswin32]. On other PCs with the same version of ru...

With Ruby, where to use NOT, AND, OR, XOR operations for Fixnum or Bignum?

Hi, Just wondering if anyone has any realworld examples or know when you might use the NOT, AND, OR, XOR, <<, >> operators in Ruby. I've been programming for 4 years and never come across the need to use any of these, wondering how common actual usage is & if its something I should fully understand. Thanks, -J ...