@@ -3512,9 +3512,10 @@ InitVM_Object(void)
3512
3512
rb_undef_alloc_func (rb_cNilClass );
3513
3513
rb_undef_method (CLASS_OF (rb_cNilClass ), "new" );
3514
3514
/*
3515
- * An alias of +nil+
3515
+ * An obsolete alias of +nil+
3516
3516
*/
3517
3517
rb_define_global_const ("NIL" , Qnil );
3518
+ rb_deprecate_constant (rb_cObject , "NIL" );
3518
3519
3519
3520
rb_define_method (rb_cModule , "freeze" , rb_mod_freeze , 0 );
3520
3521
rb_define_method (rb_cModule , "===" , rb_mod_eqq , 1 );
@@ -3596,9 +3597,10 @@ InitVM_Object(void)
3596
3597
rb_undef_alloc_func (rb_cTrueClass );
3597
3598
rb_undef_method (CLASS_OF (rb_cTrueClass ), "new" );
3598
3599
/*
3599
- * An alias of +true+
3600
+ * An obsolete alias of +true+
3600
3601
*/
3601
3602
rb_define_global_const ("TRUE" , Qtrue );
3603
+ rb_deprecate_constant (rb_cObject , "TRUE" );
3602
3604
3603
3605
rb_cFalseClass = rb_define_class ("FalseClass" , rb_cObject );
3604
3606
rb_define_method (rb_cFalseClass , "to_s" , false_to_s , 0 );
@@ -3610,17 +3612,10 @@ InitVM_Object(void)
3610
3612
rb_undef_alloc_func (rb_cFalseClass );
3611
3613
rb_undef_method (CLASS_OF (rb_cFalseClass ), "new" );
3612
3614
/*
3613
- * An alias of +false+
3615
+ * An obsolete alias of +false+
3614
3616
*/
3615
3617
rb_define_global_const ("FALSE" , Qfalse );
3616
-
3617
- {
3618
- VALUE names [3 ];
3619
- names [0 ] = ID2SYM (rb_intern_const ("TRUE" ));
3620
- names [1 ] = ID2SYM (rb_intern_const ("FALSE" ));
3621
- names [2 ] = ID2SYM (rb_intern_const ("NIL" ));
3622
- rb_mod_deprecate_constant (3 , names , rb_cObject );
3623
- }
3618
+ rb_deprecate_constant (rb_cObject , "FALSE" );
3624
3619
}
3625
3620
3626
3621
void
0 commit comments