summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-07-02 10:02:35 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-07-02 10:02:35 +0000
commit38dc5de975aa0a5b22b2d10e284f1062df83c4f5 (patch)
tree042299d482a76df8598e45165fe1431afe090a49
parent13b7f4c7543997f809fd41c8aafb88d2d00fb111 (diff)
downloadruby-38dc5de975aa0a5b22b2d10e284f1062df83c4f5.tar.gz
ruby-38dc5de975aa0a5b22b2d10e284f1062df83c4f5.tar.xz
ruby-38dc5de975aa0a5b22b2d10e284f1062df83c4f5.zip
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: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8_6@17811 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--numeric.c4
-rw-r--r--version.h2
3 files changed, 9 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index faca511a3..0aeb6f041 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Wed Jul 2 19:01:13 2008 Tanaka Akira <akr@fsij.org>
+
+ * numeric.c (num_coerce): call rb_Float(x) first. don't depend on
+ evaluation order of function arguments.
+
Wed Jul 2 18:55:50 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
* ext/syslog/syslog.c (syslog_write): syslog operations should be
diff --git a/numeric.c b/numeric.c
index c91a06ddb..98d5f9600 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 7fe491fab..24c0f0199 100644
--- a/version.h
+++ b/version.h
@@ -2,7 +2,7 @@
#define RUBY_RELEASE_DATE "2008-07-02"
#define RUBY_VERSION_CODE 186
#define RUBY_RELEASE_CODE 20080702
-#define RUBY_PATCHLEVEL 262
+#define RUBY_PATCHLEVEL 263
#define RUBY_VERSION_MAJOR 1
#define RUBY_VERSION_MINOR 8