From 4cabda0a566c10aae6c4ecb6ac193c88e9d47199 Mon Sep 17 00:00:00 2001 From: Dmitriy Non Date: Tue, 15 Oct 2019 10:38:24 +0100 Subject: [PATCH] [ruby] merge if/else with if/elsif/else No need to add extra lines to the output. Shorter is better :) --- sheets/_ruby/control_flow | 6 ------ 1 file changed, 6 deletions(-) diff --git a/sheets/_ruby/control_flow b/sheets/_ruby/control_flow index 5e8be21..6f9ce74 100644 --- a/sheets/_ruby/control_flow +++ b/sheets/_ruby/control_flow @@ -22,13 +22,7 @@ end end # Conditionals -if 2 * 4 == 8 - puts 'thank goodness' -else - puts 'error between keyboard and chair' -end -# Add an extra condition if 1 == 0 puts 'oh no' elsif 1 == 1