Skip to content

Instantly share code, notes, and snippets.

@ukstudio
Created February 26, 2009 15:15
Show Gist options
  • Save ukstudio/70902 to your computer and use it in GitHub Desktop.
Save ukstudio/70902 to your computer and use it in GitHub Desktop.
# coding: UTF-8
class Duck; end
def foo(obj)
raise TypeError, "アヒルじゃないです" unless obj.is_a? Duck
end
foo(Object.new) #=> TypeError
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment