lib/cri/command_dsl.rb in cri-2.0a2 vs lib/cri/command_dsl.rb in cri-2.0a3
- old
+ new
@@ -71,12 +71,12 @@
self.add_option(short, long, desc, :optional, block)
end
# @todo Document
def run(&block)
- if block.arity != 2
+ unless block.arity != 2 || block.arity != 3
raise ArgumentError,
- "The block given to Cri::Command#run expects exactly two args"
+ "The block given to Cri::Command#run expects two or three args"
end
@command.block = block
end