Last active
April 11, 2023 14:11
-
-
Save JoshCheek/5625007 to your computer and use it in GitHub Desktop.
void value expressions make no sense
This file contains hidden or 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
-> { a = case when true then return end } # this is allowed | |
-> { a = if true then return end } # this is not | |
-> { a = if true then return; 2 end } # this is | |
-> { a = (true && return) } # this is allowed | |
-> { a = (return && true) } # this is not | |
-> { a = begin; return | |
rescue; return | |
ensure; return | |
end } # this is allowed | |
-> { a = begin; return; end } # this is not |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ruby is insane, because is genial!