From: Robert Skarwecki Date: 2002-07-25T00:02:28+09:00 Subject: [PATCH] object.c ruby.h (fwd) Hello everybody, my name is Robert Skarwecki and this is my first contribution to the Ruby development. The patch implements the ToDo task "introduce Boolean class; super of TrueClass, FalseClass". A quick test shows the result: $ ruby -e "puts true.class.ancestors.join(',')" TrueClass,Object,Kernel $ ./ruby -e "puts true.class.ancestors.join(',')" TrueClass,BooleanClass,Object,Kernel Here are the patched files. Do they reflect the finished state of the task or is there anything else left to do, if so, what is it ? Index: object.c =================================================================== RCS file: /src/ruby/object.c,v retrieving revision 1.81 diff -r1.81 object.c 29a30 > VALUE rb_cBooleanClass; 1382c1383,1387 < rb_cTrueClass = rb_define_class("TrueClass", rb_cObject); --- > rb_cBooleanClass = rb_define_class("BooleanClass", rb_cObject); > rb_undef_method(CLASS_OF(rb_cBooleanClass), "allocate"); > rb_undef_method(CLASS_OF(rb_cBooleanClass), "new"); > > rb_cTrueClass = rb_define_class("TrueClass", rb_cBooleanClass); 1391c1396 < rb_cFalseClass = rb_define_class("FalseClass", rb_cObject); --- > rb_cFalseClass = rb_define_class("FalseClass", rb_cBooleanClass); Index: ruby.h =================================================================== RCS file: /src/ruby/ruby.h,v retrieving revision 1.66 diff -r1.66 ruby.h 553a554 > EXTERN VALUE rb_cBooleanClass; Bye, Robert