aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--complex.c4
-rw-r--r--iseq.c4
-rw-r--r--time.c8
4 files changed, 12 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index 86a0928673..e1443b5502 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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]
diff --git a/complex.c b/complex.c
index 386f2ddd18..2efe6a4676 100644
--- a/complex.c
+++ b/complex.c
@@ -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);
/* --- */
diff --git a/iseq.c b/iseq.c
index 31ec7b2787..7fc35df3e7 100644
--- a/iseq.c
+++ b/iseq.c
@@ -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. */
diff --git a/time.c b/time.c
index 44ea1cf5ae..19517a785d 100644
--- a/time.c
+++ b/time.c
@@ -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