diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-12-02 09:57:47 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-12-02 09:57:47 +0000 |
commit | f6f388a5bdbd3d3a68bf18f3352ba2be12688639 (patch) | |
tree | 3bdfb745e956666c70e078e9f3243a3a5b54c417 /numeric.c | |
parent | d64a73e1ddba8706617205dab4e640f5ce7191b0 (diff) |
* array.c, enum.c, insns.def, io.c, numeric.c, parse.y, process.c,
range.c: use prepared IDs.
A patch from charliesome (Charlie Somerville).
[Bug #7495]
* common.mk: add dependency to id.h.
* common.mk: replace ID_H_INCLUDES with id.h.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38143 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'numeric.c')
-rw-r--r-- | numeric.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -13,6 +13,7 @@ #include "ruby/encoding.h" #include "ruby/util.h" #include "internal.h" +#include "id.h" #include <ctype.h> #include <math.h> #include <stdio.h> @@ -1528,7 +1529,7 @@ int_round_0(VALUE num, int ndigits) ID op; /* If 10**N / 2 > num, then return 0 */ /* We have log_256(10) > 0.415241 and log_256(1/2) = -0.125, so */ - bytes = FIXNUM_P(num) ? sizeof(long) : rb_funcall(num, rb_intern("size"), 0); + bytes = FIXNUM_P(num) ? sizeof(long) : rb_funcall(num, idSize, 0); if (-0.415241 * ndigits - 0.125 > bytes ) { return INT2FIX(0); } |