injekt/slop — Issue #34: Problem with :default => true
Author: shreeve
Created: 2011-11-11 16:28:33+00:00
State: open

There's a bug in the current version of slop where setting an option like:

on :f, :foo, 'Set foo option', :default => true

and invoking Slop without any options will erroneously return:

opts.foo? => false <== This is wrong! (I think it should be automatically defaulted to true)
opts['foo'] => true

For now, I'm using the latter form for options that need :default => true