I'm wondering if the fact that:
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.
I'm wondering if the fact that:
represents an inconsistency in the design of Radix? FYI,
The reason is at least understandable.
10is 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.