Skip to content

Instantly share code, notes, and snippets.

@filipevarjao
Created May 4, 2012 13:27
Show Gist options
  • Save filipevarjao/2594798 to your computer and use it in GitHub Desktop.
Save filipevarjao/2594798 to your computer and use it in GitHub Desktop.
Before:
messages = case message
when Array then message
when nil then []
else [message]
end
After:
messages = Array(message)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment