Ad
  • Custom User Avatar

    In the ::is_valid method I use an Integer instance method called digits on the number argument in order to break the number into an array of its constituent digits, and I get this error message: <NoMethodError: undefined method `digits' for 1:Fixnum>. But the Integer class is the parent of Fixnum, so the method 'digits' should be defined for the Fixnum 1. What gives? These tests pass in irb. Oh, by the way, I'm coding in Ruby.