From: mike@... Date: 2015-11-03T07:44:51+00:00 Subject: [ruby-core:71310] [Ruby trunk - Bug #11648] [Open] Undocumented features of String#oct Issue #11648 has been reported by Mike Pastore. ---------------------------------------- Bug #11648: Undocumented features of String#oct https://bugs.ruby-lang.org/issues/11648 * Author: Mike Pastore * Status: Open * Priority: Normal * Assignee: * ruby -v: ruby 2.2.3p173 (2015-08-18 revision 51636) [x86_64-linux] * Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN ---------------------------------------- String#oct will adjust the base of the stringy number being converted to 2 (if prefixed with 0B), 8 (also the default, if prefixed with 0O), 10 (if prefixed with 0D), or 16 (if prefixed with 0X). Much to my surprise this behavior is not documented at ruby-doc.org [1]. Is this the intended behavior and if so should the documentation be updated? If it is not the intended behavior, perhaps String#oct should raise an exception if someone tries to use this undocumented feature? 1. http://ruby-doc.org/core-2.2.3/String.html#method-i-oct -- https://bugs.ruby-lang.org/