radix
radix copied to clipboard
Inconsistent representation?
I'm wondering if the fact that:
10.b(16) != "10".b(16)
represents an inconsistency in the design of Radix? FYI,
10.b(16).to_i => 10
"10".b(16).to_i => 16
The reason is at least understandable. 10 is already a base-10 representation, where as "10", being a string, has no implicit base.
I suppose there may be no other way to handle it, but it does seem like a source of confusion.