Skip to content

Instantly share code, notes, and snippets.

@mwhuss
Created May 17, 2010 18:44
Show Gist options
  • Save mwhuss/404085 to your computer and use it in GitHub Desktop.
Save mwhuss/404085 to your computer and use it in GitHub Desktop.
class Numeric
def neg
self.abs * -1
end
end
puts 5.neg # => -5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment