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

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