injekt/slop — Issue #33: as: :int produces odd results without argument: true
Author: mistydemeo
Created: 2011-11-10 15:58:52+00:00
State: open

Using `as: :int` produces odd results when the user forgets to specify that there is an optional or mandatory argument.

```ruby
do :l, :loops, as: int

opts[:l]
```

produces `0` when `-l n` or `-l` is provided. With `optional: true`, the return value is int n for `-l n`, and nil for `-l` (which is more what I would expect).

This is really more of a user bug, but I thought the behaviour was a little weird.