Skip to content

Instantly share code, notes, and snippets.

@joho
Forked from ryan-allen/unicode-methods.rb
Created November 16, 2010 05:32
Show Gist options
  • Save joho/701486 to your computer and use it in GitHub Desktop.
Save joho/701486 to your computer and use it in GitHub Desktop.
def ¿
puts 'IMA UPSIDEDOWN QUESTIONMARK LOL'
end
¿ # => IMA UPSIDEDOWN QUESTIONMARK LOL
¿ # => IMA UPSIDEDOWN QUESTIONMARK LOL
¿ # => IMA UPSIDEDOWN QUESTIONMARK LOL
¿ # => IMA UPSIDEDOWN QUESTIONMARK LOL
¿ # => IMA UPSIDEDOWN QUESTIONMARK LOL
¿ # => IMA UPSIDEDOWN QUESTIONMARK LOL
module SpanishTheShitOutOfThis
def method_missing(method, args)
if method /^¡|¿(.+)/
send $1, *args
else
super
end
end
end
class Thingo
include SpanishTheShitOutOfThis
def que?
"foo"
end
def muy_bien!
"shit yeah!"
end
end
t = Thingo.new
t.¿que? # => "foo"
t.¡muy_bien! # => "shit yeah!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment