Actions
Bug #13992
closedStrange behaviour for kernel#integer method
Bug #13992:
Strange behaviour for kernel#integer method
Updated by zverok (Victor Shepelev) almost 9 years ago
Yes, it does. Leading zero designates octal number (base 8), which can't have digit "8" in it.
Updated by zverok (Victor Shepelev) almost 9 years ago
Updated by shevegen (Robert A. Heiler) almost 9 years ago
Docu is at:
https://ruby-doc.org/core/Kernel.html#method-i-Integer
Perhaps the octal-notation could also be put into the documentation there.
And an example could be added for octal-input leading to error such as the
above. That would help explain things to newcomers who may be surprised
about the behaviour.
Updated by Ursus (Ivan Lasorsa) almost 9 years ago
Updated by jeremyevans0 (Jeremy Evans) about 7 years ago
- Status changed from Open to Closed
Actions