Skip to content

Instantly share code, notes, and snippets.

@brixen
Created June 19, 2014 19:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brixen/030c2bd48e0f97649ccd to your computer and use it in GitHub Desktop.
Save brixen/030c2bd48e0f97649ccd to your computer and use it in GitHub Desktop.
while a
b[x] ||=
(
break if c
d
)
end
@chuckremes
Copy link

I didn't even know you could do that.

@BGuimberteau
Copy link

Like this ?

while a
  b[x] ||= c ? break : d
end

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