Skip to content

Instantly share code, notes, and snippets.

@caius
Created June 16, 2020 21:36
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 caius/25f984560daca1ddfbe7ea040faf95eb to your computer and use it in GitHub Desktop.
Save caius/25f984560daca1ddfbe7ea040faf95eb to your computer and use it in GitHub Desktop.
# What I expect it to be corrected to:
#
# something = begin
# raise "thing"
# rescue => e
# p e
# end
# What it's actually corrected to (standard gem v0.4.7)
something = begin
raise "thing"
rescue => e
p e
end
p something
## Reasoning
#
# Assigning a thing whilst nesting if/else doesn't bring them inline with if, but start of line:
other_thing = if :a == :b
p "uh oh"
else
p "no match"
end
p other_thing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment