From 4cabda0a566c10aae6c4ecb6ac193c88e9d47199 Mon Sep 17 00:00:00 2001 From: Dmitriy Non Date: Tue, 15 Oct 2019 10:38:24 +0100 Subject: [PATCH 1/2] [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 From 32ab01e12aaa09c4226ef146ff94838554cf7238 Mon Sep 17 00:00:00 2001 From: Dmitriy Non Date: Tue, 15 Oct 2019 10:39:34 +0100 Subject: [PATCH 2/2] remove extra empty line --- sheets/_ruby/control_flow | 1 - 1 file changed, 1 deletion(-) diff --git a/sheets/_ruby/control_flow b/sheets/_ruby/control_flow index 6f9ce74..e8e609c 100644 --- a/sheets/_ruby/control_flow +++ b/sheets/_ruby/control_flow @@ -22,7 +22,6 @@ end end # Conditionals - if 1 == 0 puts 'oh no' elsif 1 == 1