Skip to content

Instantly share code, notes, and snippets.

@bdimcheff
Created October 15, 2008 19:35
Show Gist options
  • Save bdimcheff/16985 to your computer and use it in GitHub Desktop.
Save bdimcheff/16985 to your computer and use it in GitHub Desktop.
class Time
class << self
alias_method :parse, :parse_without_new_stuff
def parse(str)
if(string_is_in_your_format)
#do your parsing
else
parse_without_new_stuff(str)
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment