Skip to content

Instantly share code, notes, and snippets.

@adambair
Created February 1, 2011 19:09
Show Gist options
  • Select an option

  • Save adambair/806405 to your computer and use it in GitHub Desktop.

Select an option

Save adambair/806405 to your computer and use it in GitHub Desktop.
def interests_text
interests = []
interests << 'Design' if 'design'
interests << 'Web Development' if 'web'
interests << 'Mobile Development' if 'mobile'
interests << 'Strategy' if 'strategy'
interests << 'Products' if 'products'
interests << 'Other' if 'other'
interests
end
@adambair
Copy link
Copy Markdown
Author

adambair commented Feb 1, 2011

Found this beauty today -- "warning: string literal in condition" - no doubt. wtf. This code will always return an array of all of the items listed. "warning: string literal in condition" is there for a reason. SIGH.

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