ruby-changes:26058
From: nobu <ko1@a...>
Date: Sat, 1 Dec 2012 18:17:13 +0900 (JST)
Subject: [ruby-changes:26058] nobu:r38115 (trunk): complex.c, time.c: make marshal methods private
nobu 2012-12-01 18:17:02 +0900 (Sat, 01 Dec 2012) New Revision: 38115 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=38115 Log: complex.c, time.c: make marshal methods private * complex.c (Init_Complex), time.c (Init_Time): make marshal methods private. [Feature #6539] Modified files: trunk/ChangeLog trunk/complex.c trunk/iseq.c trunk/time.c Index: complex.c =================================================================== --- complex.c (revision 38114) +++ complex.c (revision 38115) @@ -2200,9 +2200,9 @@ rb_define_method(rb_cComplex, "to_s", nucomp_to_s, 0); rb_define_method(rb_cComplex, "inspect", nucomp_inspect, 0); - rb_define_method(rb_cComplex, "marshal_dump", nucomp_marshal_dump, 0); + rb_define_private_method(rb_cComplex, "marshal_dump", nucomp_marshal_dump, 0); compat = rb_define_class_under(rb_cComplex, "compatible", rb_cObject); - rb_define_method(compat, "marshal_load", nucomp_marshal_load, 1); + rb_define_private_method(compat, "marshal_load", nucomp_marshal_load, 1); rb_marshal_define_compat(rb_cComplex, compat, nucomp_dumper, nucomp_loader); /* --- */ Index: time.c =================================================================== --- time.c (revision 38114) +++ time.c (revision 38115) @@ -5051,12 +5051,12 @@ rb_define_method(rb_cTime, "strftime", time_strftime, 1); /* methods for marshaling */ - rb_define_method(rb_cTime, "_dump", time_dump, -1); - rb_define_singleton_method(rb_cTime, "_load", time_load, 1); + rb_define_private_method(rb_cTime, "_dump", time_dump, -1); + rb_define_private_method(rb_singleton_class(rb_cTime), "_load", time_load, 1); #if 0 /* Time will support marshal_dump and marshal_load in the future (1.9 maybe) */ - rb_define_method(rb_cTime, "marshal_dump", time_mdump, 0); - rb_define_method(rb_cTime, "marshal_load", time_mload, 1); + rb_define_private_method(rb_cTime, "marshal_dump", time_mdump, 0); + rb_define_private_method(rb_cTime, "marshal_load", time_mload, 1); #endif #ifdef DEBUG_FIND_TIME_NUMGUESS Index: ChangeLog =================================================================== --- ChangeLog (revision 38114) +++ ChangeLog (revision 38115) @@ -1,5 +1,8 @@ -Sat Dec 1 18:16:55 2012 Nobuyoshi Nakada <nobu@r...> +Sat Dec 1 18:17:00 2012 Nobuyoshi Nakada <nobu@r...> + * complex.c (Init_Complex), time.c (Init_Time): make marshal methods + private. [Feature #6539] + * object.c (Init_Object): make remove_instance_variable public. [Feature #6539] Index: iseq.c =================================================================== --- iseq.c (revision 38114) +++ iseq.c (revision 38115) @@ -2078,8 +2078,8 @@ rb_define_method(rb_cISeq, "line_trace_specify", rb_iseq_line_trace_specify, 2); #if 0 /* TBD */ - rb_define_method(rb_cISeq, "marshal_dump", iseq_marshal_dump, 0); - rb_define_method(rb_cISeq, "marshal_load", iseq_marshal_load, 1); + rb_define_private_method(rb_cISeq, "marshal_dump", iseq_marshal_dump, 0); + rb_define_private_method(rb_cISeq, "marshal_load", iseq_marshal_load, 1); #endif /* disable this feature because there is no verifier. */ -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/