I'm using the following snippet to only alias the method if the method exists:
alias_method old_name, func_name if self.respond_to? func_name
How can it Error with alias_method': undefined method 'get' for class 'Sinatra::Base' (NameError) when self.respond_to? func_name returns true?
func_name = :get in this snippet