diff options
-rwxr-xr-x | lib/highline/question.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/highline/question.rb b/lib/highline/question.rb index f5d70bf..27b18b4 100755 --- a/lib/highline/question.rb +++ b/lib/highline/question.rb @@ -291,7 +291,11 @@ class HighLine def final_response(error) response = final_responses[error] - response.call(answer) rescue response + if response.respond_to?(:call) + response.call(answer) + else + response + end end # |