From: Florian Gross Date: 2007-07-16T02:07:44+09:00 Subject: Re: rb_cstr_to_inum use of strtoul as an optimization has unfortunate side effects On another note, String#oct allows the base to be changed by a base prefix: "0b1010".oct.to_s(2) # => "1010" "0xff".oct.to_s(16) # => "ff" "0d20".oct.to_s(10) # => "20" Which is somewhat against the expectation the method name creates and inconsistent with String#hex: "0b1010".hex.to_s(16) # => "b1010" "0o77".hex.to_s(16) # => "0" "0d20".hex.to_s(16) # => "d20" Is this by design? The change would be highly trivial. (Change one character in string.c)