From de20b0bf59e766b1aad7ca62bdca8b2bcfb6c649 Mon Sep 17 00:00:00 2001 From: shigek Date: Tue, 5 Aug 2003 14:03:57 +0000 Subject: [PATCH] Trailing 0s in split removed.(to_digits changed). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4333 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/bigdecimal/lib/bigdecimal/util.rb | 2 -- 1 file changed, 2 deletions(-) diff --git a/ext/bigdecimal/lib/bigdecimal/util.rb b/ext/bigdecimal/lib/bigdecimal/util.rb index 7a4a1e5e2d..3340d53550 100644 --- a/ext/bigdecimal/lib/bigdecimal/util.rb +++ b/ext/bigdecimal/lib/bigdecimal/util.rb @@ -38,8 +38,6 @@ class BigDecimal < Numeric else i = self.to_i.to_s s,f,y,z = self.frac.split - f = f.gsub(/0+$/,"") - f = "0" if f=="" i + "." + ("0"*(-z)) + f end end