diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-07-06 11:49:03 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-07-06 11:49:03 +0000 |
commit | 8ddf0263bb0a8536e40eb088d8620f13f28c4c52 () | |
tree | c7c4b520d2901ee3ae854b2662a0944a69faa887 /lib/optparse.rb | |
parent | 06a3a10acf1951429e3e2e8d18fd1a283fa5b132 (diff) |
Fix DecimalInteger converting to octal bug
Previously if the input started with a '0' then it will be converted as octal even though it has been specified as a decimal. This commit forces the number to be interpreted as a decimal. [ruby-core:81927] [Bug #13722] [Fix GH-1665] Author: william <[email protected]> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59273 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | lib/optparse.rb | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1865,7 +1865,7 @@ XXX DecimalInteger = /\A[-+]?#{decimal}\z/io accept(DecimalInteger, DecimalInteger) {|s,| begin - Integer(s) rescue ArgumentError raise OptionParser::InvalidArgument, s end if s |