Skip to content

Instantly share code, notes, and snippets.

@marcroberts
Created May 31, 2013 12:11
Show Gist options
  • Select an option

  • Save marcroberts/5684576 to your computer and use it in GitHub Desktop.

Select an option

Save marcroberts/5684576 to your computer and use it in GitHub Desktop.
object.new now calls initialise if it exists before trying initialize
class Object
alias :old_initialize :initialize
def initialize(*args,&blk)
if respond_to? :initialise
initialise(*args,&blk)
else
old_initialize(*args,&blk)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment