class MyClass def my_method puts "This is the only method allowed in MyClass." end MyClass.freezeendclass MyClass def my_method puts "I like this implementation of my_method better." endend