diff options
| author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-05-24 15:24:23 +0000 |
|---|---|---|
| committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-05-24 15:24:23 +0000 |
| commit | 088deb9da88e49c930a024efa691ee42cdec4986 (patch) | |
| tree | ff1c75554fe43498d3a3e2a629a3fca0e17cba97 /numeric.c | |
| parent | 088066c5afdde246ad518eb8505b39ef8b40eb7f (diff) | |
| download | ruby-088deb9da88e49c930a024efa691ee42cdec4986.tar.gz ruby-088deb9da88e49c930a024efa691ee42cdec4986.tar.xz ruby-088deb9da88e49c930a024efa691ee42cdec4986.zip | |
* numeric.c (fix_pow): support Fixnum ** Float case directly
without coercing. [ruby-talk:142697] [ruby-talk:143054]
* ruby.c (require_libraries): caused SEGV when continuation jumped
in to the required library code.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@8516 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'numeric.c')
| -rw-r--r-- | numeric.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -2197,6 +2197,9 @@ fix_pow(x, y) return rb_big_pow(rb_int2big(a), y); } return rb_float_new(pow((double)a, (double)b)); + } else if (TYPE(y) == T_FLOAT) { + long a = FIX2LONG(x); + return rb_float_new(pow((double)a, RFLOAT(y)->value)); } return rb_num_coerce_bin(x, y); } |
