Created
December 17, 2008 21:28
-
-
Save dustin/37234 to your computer and use it in GitHub Desktop.
Playing around with reserved words. Ruby doesn't seem to care.
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
#!/usr/bin/env ruby -w | |
class O | |
def yield | |
puts "Yielded." | |
end | |
def do | |
puts "Doing." | |
end | |
def def | |
puts "Deffing." | |
end | |
def end | |
puts "Ending." | |
end | |
def return | |
puts "Returning." | |
end | |
def loop | |
puts "Looping." | |
end | |
end | |
O.new.yield | |
O.new.do | |
O.new.def | |
O.new.end | |
O.new.return | |
O.new.loop |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment