ruby/ruby — pull request #259 by prijutme4ty (2013-03-18 12:52:24+00:00)
Title: Make OptionParser able to use negative numbers as positional arguments

Look dicussion at http://bugs.ruby-lang.org/issues/7537
Now negative numerics are treated as options only if some numeric options were explicitly specified. Instead they are treated as positional arguments.

One possible incompatibility introduced. It can happen if one explicitly specified numeric option (e.g. `-1`) and option which takes unrequired argument (in form `-p [VAL]` and not in form `-p=[VAL]`).
Then old version treats `-p -1` as two different options while new version treats `-1` as `VAL` for `-p` option but not a separate option.
To restore old behavior one can either just use this options in different order: `-1 -p` or use declaration of option with equal sign: `-p=[VAL]`.
Tests illustrate this case.