From 7f2b685bfbd2bf20c1f0cfca787196704875c17f Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Wed, 11 Jun 2014 15:31:13 -0400 Subject: [PATCH] shorten Environment#shell code a bit --- lib/rscons/environment.rb | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/lib/rscons/environment.rb b/lib/rscons/environment.rb index b0480dc..5e2ef13 100644 --- a/lib/rscons/environment.rb +++ b/lib/rscons/environment.rb @@ -362,13 +362,7 @@ module Rscons def shell(command) shell_cmd = if self["SHELL"] - flag = self["SHELLFLAG"] || begin - if self["SHELL"] == "cmd" - "/c" - else - "-c" - end - end + flag = self["SHELLFLAG"] || (self["SHELL"] == "cmd" ? "/c" : "-c") [self["SHELL"], flag] else Rscons.get_system_shell