I can't figure it out why, when I type 67 in Rails' console, the output is 67, but 067 returns 55.
Can someone explain this to me?
Starting a number with a 0 denotes that the number is in octal notation.
When you type in 067, you're really saying "67 in octal notation" or "678 (67 base 8)". When Ruby outputs that number it converts it to decimal (base 10).
Since 678 == 5510, Ruby outputs 55.
Check out "How do I convert an octal number to decimal in Ruby?" that mentions the leading 0.
See "Octal to decimal converter" for an octal calculator: