From ed2c44bbfe994aef8b23924882b4f965def59dc5 Mon Sep 17 00:00:00 2001 From: shyouhei Date: Wed, 2 Jul 2008 10:05:01 +0000 Subject: merge revision(s) 17749:17752: * numeric.c (num_coerce): call rb_Float(x) first. don't depend on evaluation order of function arguments. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@17813 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ numeric.c | 4 +++- version.h | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6b615bd5f6..094812c3b5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Wed Jul 2 19:03:37 2008 Tanaka Akira + + * numeric.c (num_coerce): call rb_Float(x) first. don't depend on + evaluation order of function arguments. + Wed Jul 2 18:57:19 2008 Yukihiro Matsumoto * ext/syslog/syslog.c (syslog_write): syslog operations should be diff --git a/numeric.c b/numeric.c index aaf98b62e8..b7b60982a7 100644 --- a/numeric.c +++ b/numeric.c @@ -121,7 +121,9 @@ num_coerce(x, y) { if (CLASS_OF(x) == CLASS_OF(y)) return rb_assoc_new(y, x); - return rb_assoc_new(rb_Float(y), rb_Float(x)); + x = rb_Float(x); + y = rb_Float(y); + return rb_assoc_new(y, x); } static VALUE diff --git a/version.h b/version.h index 7e93ce7ecb..c8b5b3f3ac 100644 --- a/version.h +++ b/version.h @@ -2,7 +2,7 @@ #define RUBY_RELEASE_DATE "2008-07-02" #define RUBY_VERSION_CODE 187 #define RUBY_RELEASE_CODE 20080702 -#define RUBY_PATCHLEVEL 44 +#define RUBY_PATCHLEVEL 45 #define RUBY_VERSION_MAJOR 1 #define RUBY_VERSION_MINOR 8 -- cgit v1.2.3