Permalink
Browse files

Fixed a bug

  • Loading branch information...
1 parent 1d5bec3 commit e49ad0b7cc3eeec66749682e765365f19063402d @genki committed Jan 24, 2012
Showing with 3 additions and 3 deletions.
  1. +2 −2 lib/pry-pretty-numeric.rb
  2. +1 −1 lib/pry-pretty-numeric/version.rb
@@ -4,8 +4,8 @@
class Numeric
def pretty_inspect
integral, fractional = super.split('.', 2)
- integral = integral.reverse.gsub(/.{3}(?!$)/, '\&_').reverse
- fractional = fractional.gsub(/.{3}/, '\&_') if fractional
+ integral = integral.reverse.gsub(/\d{3}(?!$)/, '\&_').reverse
+ fractional = fractional.gsub(/\d{3}(?!$)/, '\&_') if fractional
[integral, fractional].compact.join('.')
end
end
@@ -1,5 +1,5 @@
class Pry
module PrettyNumeric
- VERSION = "0.1.0"
+ VERSION = "0.1.1"
end
end

0 comments on commit e49ad0b

Please sign in to comment.