require 'optparse'
opt_parser = OptionParser.new do |opts|
opts.on('-a', '--abc [one [two]]') do |one, two|
p [one, one.nil?], [two, two.nil?]
end
end
opt_parser.parse!(['--abc', 'first', 'second'])
opt_parser.parse!(['--abc', 'first second'])
cmVxdWlyZSAnb3B0cGFyc2UnCgpvcHRfcGFyc2VyID0gT3B0aW9uUGFyc2VyLm5ldyBkbyB8b3B0c3wKCW9wdHMub24oJy1hJywgJy0tYWJjIFtvbmUgW3R3b11dJykgZG8gfG9uZSwgdHdvfAoJCXAgW29uZSwgb25lLm5pbD9dLCBbdHdvLCB0d28ubmlsP10KCWVuZAplbmQKCm9wdF9wYXJzZXIucGFyc2UhKFsnLS1hYmMnLCAnZmlyc3QnLCAnc2Vjb25kJ10pCm9wdF9wYXJzZXIucGFyc2UhKFsnLS1hYmMnLCAnZmlyc3Qgc2Vjb25kJ10pCg==