ruby/ruby-1.8.x-null-class-must-be-Qnil.patch

22 lines
593 B
Diff
Raw Normal View History

Sun Mar 1 03:04:19 2009 Akinori MUSHA <knu@iDaemons.org>
* 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().
Index: ruby_1_8/class.c
===================================================================
--- ruby_1_8/class.c (revision 22678)
+++ ruby_1_8/class.c (revision 22679)
@@ -153,7 +153,7 @@
data.klass = obj;
break;
default:
- data.klass = 0;
+ data.klass = Qnil;
break;
}