Skip to content

Instantly share code, notes, and snippets.

@chezou

chezou/gist:8600244

Created Jan 24, 2014
Embed
What would you like to do?
[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
You can’t perform that action at this time.