From a9327e2b39866db4cf9a95b392689edb44c5c28c Mon Sep 17 00:00:00 2001 From: Jacob Lorenzen Date: Sun, 3 Dec 2023 14:38:30 +0100 Subject: [PATCH] chore: refactor method --- lib/day03.rb | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/day03.rb b/lib/day03.rb index 89b0bd6..34c0dd9 100644 --- a/lib/day03.rb +++ b/lib/day03.rb @@ -22,10 +22,7 @@ def parse_number(map, from, to, y) end def valid_char?(candidate) - if candidate != "." and !candidate.match?(/\d/) - return true - end - false + candidate != "." and !candidate.match?(/\d/) end def is_valid?(map, from, to, y)