Keep Our Parks Clean!
Can you change a method name in a class without littering your class with unused methods?
There is hidden code with assertions that is also being run to test out your code.
class BasePark def self.clean_alias_method(new_name,old_name) ___ end end class Park < BasePark def bad_method_name "This should have a better name" end clean_alias_method(:good_method_name,:bad_method_name) end assert_equal(Park.new.good_method_name, "This should have a better name") assert_equal(Park.new.respond_to?(:bad_method_name),false)
Back to Problems