Skip to content

Instantly share code, notes, and snippets.

@chezou
Created January 24, 2014 16:03
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save chezou/8600244 to your computer and use it in GitHub Desktop.
[121] pry(main)> case str
[121] pry(main)* when ->(t){ t.size == 4 }
[121] pry(main)* puts 'size eq 4'
[121] pry(main)* else
[121] pry(main)* puts 'not eq 4'
[121] pry(main)* end
size eq 4
=> nil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment