summaryrefslogtreecommitdiff
path: root/numeric.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-08-02 14:48:55 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-08-02 14:48:55 +0000
commit7c9a3d19fcacb57463d823d06f579129fa836820 (patch)
tree1acc384bb22a56911d15fd8b5bc17c9b976b92bb /numeric.c
parent0eab2b464e6861da0cc55f6dc1c7561e6628c74e (diff)
parse.y: calculate powers of ten
* parse.y (parser_yylex): calculate denominator directly as powers of ten, not parsing string. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42334 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'numeric.c')
-rw-r--r--numeric.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/numeric.c b/numeric.c
index 05035b7c80..bdb0aaf854 100644
--- a/numeric.c
+++ b/numeric.c
@@ -2986,6 +2986,12 @@ int_pow(long x, unsigned long y)
return LONG2NUM(z);
}
+VALUE
+rb_int_positive_pow(long x, unsigned long y)
+{
+ return int_pow(x, y);
+}
+
/*
* call-seq:
* fix ** numeric -> numeric_result