From a4e76099bf44ae7d75bd24c3c8233d710e590fac Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 11 May 2012 05:09:58 +0000 Subject: * ext/bigdecimal/bigdecimal.c (PUSH): to prevent VALUE from GC, must not cast it to unsigned long, which may be shorter than VALUE, and the result can be mere garbage. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@35619 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 6 ++++++ ext/bigdecimal/bigdecimal.c | 2 +- version.h | 10 +++++----- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index fae1bb119d..9201d3e719 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Fri May 11 14:09:48 2012 Nobuyoshi Nakada + + * ext/bigdecimal/bigdecimal.c (PUSH): to prevent VALUE from GC, + must not cast it to unsigned long, which may be shorter than + VALUE, and the result can be mere garbage. + Sat Apr 14 18:51:41 2012 Nobuyoshi Nakada * bignum.c (rb_big2str0): prevent working clone from diff --git a/ext/bigdecimal/bigdecimal.c b/ext/bigdecimal/bigdecimal.c index 7846c0d771..16be5207ba 100644 --- a/ext/bigdecimal/bigdecimal.c +++ b/ext/bigdecimal/bigdecimal.c @@ -32,7 +32,7 @@ VALUE rb_cBigDecimal; /* MACRO's to guard objects from GC by keeping them in stack */ #define ENTER(n) volatile VALUE vStack[n];int iStack=0 -#define PUSH(x) vStack[iStack++] = (unsigned long)(x); +#define PUSH(x) vStack[iStack++] = (VALUE)(x); #define SAVE(p) PUSH(p->obj); #define GUARD_OBJ(p,y) {p=y;SAVE(p);} diff --git a/version.h b/version.h index a2b448729d..9dcae40fee 100644 --- a/version.h +++ b/version.h @@ -1,15 +1,15 @@ #define RUBY_VERSION "1.8.7" -#define RUBY_RELEASE_DATE "2012-04-14" +#define RUBY_RELEASE_DATE "2012-05-11" #define RUBY_VERSION_CODE 187 -#define RUBY_RELEASE_CODE 20120414 -#define RUBY_PATCHLEVEL 361 +#define RUBY_RELEASE_CODE 20120511 +#define RUBY_PATCHLEVEL 362 #define RUBY_VERSION_MAJOR 1 #define RUBY_VERSION_MINOR 8 #define RUBY_VERSION_TEENY 7 #define RUBY_RELEASE_YEAR 2012 -#define RUBY_RELEASE_MONTH 4 -#define RUBY_RELEASE_DAY 14 +#define RUBY_RELEASE_MONTH 5 +#define RUBY_RELEASE_DAY 11 #ifdef RUBY_EXTERN RUBY_EXTERN const char ruby_version[]; -- cgit v1.2.1