Created
June 21, 2018 18:41
-
-
Save keithcelt/7b293aa0470c7dc699e9120b361e66fd to your computer and use it in GitHub Desktop.
Test conditionals in Ruby
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def a | |
puts "hi" and return :hi if true | |
end | |
def b | |
(puts "hi" and return :hi) if true | |
end | |
def c | |
puts "hi" && return(:hi) if true | |
end | |
def d | |
(puts "hi" && return(:hi)) if true | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment