Skip to content

Instantly share code, notes, and snippets.

@rhysd
Created July 22, 2012 11:35
Show Gist options
  • Select an option

  • Save rhysd/3159386 to your computer and use it in GitHub Desktop.

Select an option

Save rhysd/3159386 to your computer and use it in GitHub Desktop.
a = 1
b = 'a'
case [a,b]
when [1,'b'] then "hoge"
when [2,'a'] then "huga"
when [1,'a'] then "poyo"
else "puyo" end
#=> "poyo"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment