lib/config_parser/switch.rb in configurable-0.5.0 vs lib/config_parser/switch.rb in configurable-0.6.0
- old
+ new
@@ -27,10 +27,10 @@
# Calls the block with false if the negative long is specified,
# or calls the block with true in all other cases. Raises an
# error if a value is specified.
def parse(switch, value, argv)
- raise "value specified for switch" if value
+ raise "value specified for switch: #{switch}" if value
value = (switch == negative_long ? false : true)
block ? block.call(value) : value
end
private
\ No newline at end of file