diff --git a/lib/optimist.rb b/lib/optimist.rb index 673697f..9db3439 100644 --- a/lib/optimist.rb +++ b/lib/optimist.rb @@ -57,7 +57,7 @@ def error_condition(overlap_size) (overlap_size != 0) && (overlap_size != @idents.size) end def error_message(longargs) # constraint_sym, this_sym) - "#{longargs.join(', ')} have dependency and must be given together" + "#{longargs.join(', ')} have a dependency and must be given together" end end @@ -77,7 +77,7 @@ def error_condition(overlap_size) overlap_size != 1 end def error_message(longargs) - "one of #{longargs.join(', ')} is required" + "one and only one of #{longargs.join(', ')} is required" end end @@ -263,7 +263,6 @@ def conflicts(*syms) ## Marks two (or more!) options as required but mutually exclusive. def either(*syms) syms.each { |sym| raise ArgumentError, "unknown option '#{sym}'" unless @specs[sym] } - @constraints << ConflictConstraint.new(syms) @constraints << EitherConstraint.new(syms) end