1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

complex.c, time.c: make marshal methods private

* complex.c (Init_Complex), time.c (Init_Time): make marshal methods
  private.  [Feature #6539]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38115 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2012-12-01 09:17:02 +00:00
parent 82ec3de020
commit 9c1b3161f2
4 changed files with 12 additions and 9 deletions

View file

@ -1,4 +1,7 @@
Sat Dec 1 18:16:55 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
Sat Dec 1 18:17:00 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
* 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]

View file

@ -2200,9 +2200,9 @@ Init_Complex(void)
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);
/* --- */

4
iseq.c
View file

@ -2078,8 +2078,8 @@ Init_ISeq(void)
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. */

8
time.c
View file

@ -5051,12 +5051,12 @@ Init_Time(void)
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