How can I overwrite the def method? But it's strange, cause I don't know from where the def method is defined. It's not Module, not Object, not BasicObject (of Ruby 1.9). And def.class don't say nothing ;)
I would like to use something like:
puts "cruel world."
# ...and maybe it could print:
# => "Hello!"
# => "cruel world."
Who told you
def is a method? It's not. It's a keyword, like
end, etc. So you cannot overwrite it, unless you want to write your own ruby interpreter.