Hakusa / gmail.com wrote: >>> What if I >>> wanted to override a function for a little while? I could assign it a >>> new value and use the same methods of a different class! >> Then you'll just override it. My question is, why would you want to >> override a method with a variable? I have no problem with overloading a >> method with another method, and neither should the interpreter. > > What if instead of printing bar's output with puts bar, bar was a > local variable so it printed an error message alerting the user that > something wrong has happened. I think a nicer way of doing this would be to overload bar with a method that throws an exception. > I don't really know when it would be useful, but who knows. What if > someday I find that it is? If you can do the same thing with a method I don't see the problem. Also, it would eliminate (or at least warn) when you do this: def foo 42 end puts foo # -> 42 foo = 24 if false; puts foo # -> nil I would like to be warned in this situation, as it's fairly likely I'm doing something I didn't intend to do.