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
|
||||
end
|
||||
|
||||
def self.handle_command_raises(&block) : Nil
|
||||
def self.handle_command_raises(&) : Nil
|
||||
begin
|
||||
block.call
|
||||
yield
|
||||
rescue e : CliGen::RuntimeError
|
||||
abort e.message
|
||||
rescue e : CliGen::ConfigurationError
|
||||
|
||||
@@ -75,9 +75,9 @@ module CliGen
|
||||
@flags.find{|f| f.short == short}
|
||||
end
|
||||
|
||||
def handle_flag_raises(&work)
|
||||
def handle_flag_raises(&) : Nil
|
||||
begin
|
||||
work.call
|
||||
yield
|
||||
rescue e : CliGen::RuntimeError
|
||||
abort e.message
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user