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:
parent
a179c38e4c
commit
de20b0bf59
@ -38,8 +38,6 @@ class BigDecimal < Numeric
|
|||||||
else
|
else
|
||||||
i = self.to_i.to_s
|
i = self.to_i.to_s
|
||||||
s,f,y,z = self.frac.split
|
s,f,y,z = self.frac.split
|
||||||
f = f.gsub(/0+$/,"")
|
|
||||||
f = "0" if f==""
|
|
||||||
i + "." + ("0"*(-z)) + f
|
i + "." + ("0"*(-z)) + f
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user