matthew.moss.coder
3/21/2006 11:11:00 PM
> Why does printf act like a private method here?
printf is not a method on Fixnum. The error is confusing (except that
the first word is "NoMethodError").
If you want to use printf, just do:
$stderr.printf "Magic number is: %X\n", magic_number
Or, more ruby-ish:
puts "Magic number is: #{magic_number.to_s(16)}"