From e2bc9db763f34fe935909891d4131c9bd32cac91 Mon Sep 17 00:00:00 2001 From: shyouhei Date: Fri, 11 Sep 2009 03:23:37 +0000 Subject: [PATCH] merge revision(s) 22679: * class.c (rb_singleton_class_clone): Qnil must be used for a null class reference when we use NIL_P() to check class reference validity. The bug was exposed by the spec test of Sequel. * eval.c (ruby_init): Use NEW_CREF(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@24843 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 8 ++++++++ class.c | 2 +- eval.c | 2 +- version.h | 8 ++++---- 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 70371ae8f5..5cba4249c0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Fri Sep 11 11:56:53 2009 Akinori MUSHA + + * class.c (rb_singleton_class_clone): Qnil must be used for a null + class reference when we use NIL_P() to check class reference + validity. The bug was exposed by the spec test of Sequel. + + * eval.c (ruby_init): Use NEW_CREF(). + Thu Sep 10 10:53:03 2009 NAKAMURA Usaku * io.c (rb_sysopen): workaround for MSVCRT's bug. diff --git a/class.c b/class.c index 80f57a1622..054be60d53 100644 --- a/class.c +++ b/class.c @@ -153,7 +153,7 @@ rb_singleton_class_clone(obj) data.klass = obj; break; default: - data.klass = 0; + data.klass = Qnil; break; } diff --git a/eval.c b/eval.c index 39b3048b51..37c460da80 100644 --- a/eval.c +++ b/eval.c @@ -1410,7 +1410,7 @@ ruby_init() rb_call_inits(); ruby_class = rb_cObject; ruby_frame->self = ruby_top_self; - ruby_top_cref = rb_node_newnode(NODE_CREF,rb_cObject,0,0); + ruby_top_cref = NEW_CREF(rb_cObject, 0); ruby_cref = ruby_top_cref; rb_define_global_const("TOPLEVEL_BINDING", rb_f_binding(ruby_top_self)); #ifdef __MACOS__ diff --git a/version.h b/version.h index 399d66432a..211f2be2ed 100644 --- a/version.h +++ b/version.h @@ -1,15 +1,15 @@ #define RUBY_VERSION "1.8.7" -#define RUBY_RELEASE_DATE "2009-09-10" +#define RUBY_RELEASE_DATE "2009-09-11" #define RUBY_VERSION_CODE 187 -#define RUBY_RELEASE_CODE 20090910 -#define RUBY_PATCHLEVEL 201 +#define RUBY_RELEASE_CODE 20090911 +#define RUBY_PATCHLEVEL 202 #define RUBY_VERSION_MAJOR 1 #define RUBY_VERSION_MINOR 8 #define RUBY_VERSION_TEENY 7 #define RUBY_RELEASE_YEAR 2009 #define RUBY_RELEASE_MONTH 9 -#define RUBY_RELEASE_DAY 10 +#define RUBY_RELEASE_DAY 11 #ifdef RUBY_EXTERN RUBY_EXTERN const char ruby_version[];