1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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
This commit is contained in:
shigek 2003-08-05 14:03:57 +00:00
parent a179c38e4c
commit de20b0bf59

View file

@ -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