Had to fix block.call to yield so that the compiler could be happy
This commit is contained in:
+2
-2
@@ -18,9 +18,9 @@ module CliGen
|
|||||||
super
|
super
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.handle_command_raises(&block) : Nil
|
def self.handle_command_raises(&) : Nil
|
||||||
begin
|
begin
|
||||||
block.call
|
yield
|
||||||
rescue e : CliGen::RuntimeError
|
rescue e : CliGen::RuntimeError
|
||||||
abort e.message
|
abort e.message
|
||||||
rescue e : CliGen::ConfigurationError
|
rescue e : CliGen::ConfigurationError
|
||||||
|
|||||||
@@ -75,9 +75,9 @@ module CliGen
|
|||||||
@flags.find{|f| f.short == short}
|
@flags.find{|f| f.short == short}
|
||||||
end
|
end
|
||||||
|
|
||||||
def handle_flag_raises(&work)
|
def handle_flag_raises(&) : Nil
|
||||||
begin
|
begin
|
||||||
work.call
|
yield
|
||||||
rescue e : CliGen::RuntimeError
|
rescue e : CliGen::RuntimeError
|
||||||
abort e.message
|
abort e.message
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user