You should tell OptionParser to expect an Integer here.

```ruby
opts.on('-t',
        '--times NUM_TIMES',
        Integer,
        'Times to run script, default 1.') do |times|
  settings.times = times
end
```