Skip to content

Instantly share code, notes, and snippets.

@JoshCheek
Last active April 11, 2023 14:11
Show Gist options
  • Save JoshCheek/5625007 to your computer and use it in GitHub Desktop.
Save JoshCheek/5625007 to your computer and use it in GitHub Desktop.
void value expressions make no sense
-> { 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
@kaline
Copy link

kaline commented Jan 15, 2018

Ruby is insane, because is genial!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment