Skip to content

Instantly share code, notes, and snippets.

@dustin
Created December 17, 2008 21:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dustin/37234 to your computer and use it in GitHub Desktop.
Save dustin/37234 to your computer and use it in GitHub Desktop.
Playing around with reserved words. Ruby doesn't seem to care.
#!/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