From 1df51bd2c3a3ee53834c89a074e56c361b051460 Mon Sep 17 00:00:00 2001 From: Jamie Nguyen Date: Wed, 11 May 2016 08:28:06 +0100 Subject: Prevent accumulator from being set to Nil --- bin/byteback-receive | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/byteback-receive b/bin/byteback-receive index 0d7d025..1326bba 100755 --- a/bin/byteback-receive +++ b/bin/byteback-receive @@ -116,7 +116,7 @@ end # Make sure we don't get crazy option combinations. # n_modes = opts.keys.inject(0) do |s,m| - s += 1 if [:ping, :complete, :list].include?(m) + [:ping, :complete, :list].include?(m) ? s += 1 : s end error('Please only choose one mode') unless n_modes == 1 -- cgit v1.2.1