summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-02-28 18:12:15 +0000
committerknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-02-28 18:12:15 +0000
commit5f7992aa35a51d172db304307785bda91f24070d (patch)
treeec51ab615129cd1001be8ba8957fe8075cfbf7c8
parent65564041feb853d09486f6da2a07fb95a23ece19 (diff)
* 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@22679 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog8
-rw-r--r--class.c2
-rw-r--r--eval.c2
3 files changed, 10 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index bd9cf125cf..505a3e35f3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+Sun Mar 1 03:04:19 2009 Akinori MUSHA <[email protected]>
+
+ * 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().
+
Sat Feb 28 18:05:58 2009 Nobuyoshi Nakada <[email protected]>
* eval.c (rb_eval): needs to guard intermediate string objects.
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 cf62314230..2974bb252a 100644
--- a/eval.c
+++ b/eval.c
@@ -1434,7 +1434,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__