From 2aa6a34b009a9b561f76d41bc63bd3360cf6317f Mon Sep 17 00:00:00 2001 From: Ryan Faerman Date: Thu, 22 Mar 2018 22:48:07 -0400 Subject: [PATCH] Avoid a nil result This prevents throwing our stack just because the `result` is `nil`. --- Ruby/lib/terminal-notifier.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/Ruby/lib/terminal-notifier.rb b/Ruby/lib/terminal-notifier.rb index a9d24ee..7df2693 100644 --- a/Ruby/lib/terminal-notifier.rb +++ b/Ruby/lib/terminal-notifier.rb @@ -54,6 +54,7 @@ def self.execute(verbose, options) # notify_result('@timeout', {'reply' => true}) #=> '@timeout' # notify_result('I may like pie', {}) #=> :i_may_like_pie def notify_result(result, options, always_string = false) + result = result.to_s if options[:reply] || options['reply'] || always_string result else