Ruby: Change negative number to positive number?

Posted by Shpigford on Stack Overflow See other posts from Stack Overflow or by Shpigford
Published on 2010-03-19T22:37:31Z Indexed on 2010/03/19 22:41 UTC
Read the original article Hit count: 268

Filed under:
|
|

What's the simplest way of changing a negative number to positive with ruby?

ie. Change "-300" to "300"

© Stack Overflow or respective owner

Related posts about ruby

Related posts about math