Skip to content

Instantly share code, notes, and snippets.

View ammar's full-sized avatar

Ammar Ali ammar

  • Ramallah, Palestine
View GitHub Profile
class Object
# This does not work on ruby 1.8.x because the methods are not returned
# in the order they were defined. Also, under 1.8, the method names are
# returned as strings, not symbols.
# Identifies method aliases in the class and returns an array with
# their symbols. This uses #methods, so it includes all methods
# accessible in the object's ancestors.
def alias_methods
aliases = []