From: Jason Thomas Date: 2010-08-12T02:42:41+09:00 Subject: [ruby-core:31678] [Feature #3682] String to_i automatically parse hex number with "0x" Feature #3682: String to_i automatically parse hex number with "0x" http://redmine.ruby-lang.org/issues/show/3682 Author: Jason Thomas Status: Open, Priority: Normal Category: core Hex strings can be parsed into integers only when specifying the base such as "0xFF".to_i(16) => 255. The default of "0xFF".to_i => 0 is a little confusing to newbies. If a string has "0x" it seems like the to_i method should be able to parse this successfully into an Integer directly by implicitly calling to_i(16). ---------------------------------------- http://redmine.ruby-lang.org