* numeric.c (flo_to_s): fill lower zeros.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27751 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
db96db4285
commit
16ea63ad69
@ -1,3 +1,7 @@
|
||||
Wed May 12 16:02:43 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* numeric.c (flo_to_s): fill lower zeros.
|
||||
|
||||
Wed May 12 15:45:36 2010 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||
|
||||
* lib/rdoc/generator/ri.rb (generate): should load existing cache
|
||||
|
@ -584,7 +584,11 @@ flo_to_s(VALUE flt)
|
||||
rb_str_cat(s, buf, digs + 1);
|
||||
}
|
||||
else if (decpt - digs < float_dig) {
|
||||
long len;
|
||||
char *ptr;
|
||||
rb_str_cat(s, buf, digs);
|
||||
rb_str_resize(s, (len = RSTRING_LEN(s)) + decpt - digs);
|
||||
memset(RSTRING_PTR(s) + len, '0', decpt - digs);
|
||||
rb_str_cat(s, ".0", 2);
|
||||
}
|
||||
else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user