Fix next option mistook for value of current option in Ruby version.

For example, if --foo requires a value and --foo --bar is specified in command line, then --bar would be mistakenly recognized as the value for --foo. Now a proper error is raised requiring a value for --foo.