From 2731f8a22a7177525a48eec47d18283d03dc69ae Mon Sep 17 00:00:00 2001 From: Jeremy Hinegardner Date: Thu, 2 May 2024 21:58:08 -0600 Subject: [PATCH] use empty? --- lib/launchy/applications/browser.rb | 2 +- lib/launchy/argv.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/launchy/applications/browser.rb b/lib/launchy/applications/browser.rb index 1291cf2..09fc217 100644 --- a/lib/launchy/applications/browser.rb +++ b/lib/launchy/applications/browser.rb @@ -46,7 +46,7 @@ def browser_env browser_env = ENV["BROWSER"].split(File::PATH_SEPARATOR) browser_env.flatten! - browser_env.delete_if { |b| b.nil? || b.strip.size.zero? } + browser_env.delete_if { |b| b.nil? || b.strip.empty? } browser_env end diff --git a/lib/launchy/argv.rb b/lib/launchy/argv.rb index 3de7d26..693dede 100644 --- a/lib/launchy/argv.rb +++ b/lib/launchy/argv.rb @@ -27,7 +27,7 @@ def valid? end def blank? - @argv.empty? || @argv.first.strip.size.zero? + @argv.empty? || @argv.first.strip.empty? end def executable?