Last active
December 16, 2017 15:02
-
-
Save tokudan/a3b2ac29d195bdddf560004d2c252027 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[nix-shell:~]$ cat test.rb | |
required = String | |
case required | |
when String | |
puts "performing string checks" | |
when Integer | |
puts "performing integer checks" | |
else | |
raise "unsupported" | |
end | |
[nix-shell:~]$ ruby test.rb | |
test.rb:8:in `<main>': unsupported (RuntimeError) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment