Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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
  • Loading branch information...
commit 9c1b3161f20162dc1682d758c0e4d2fc3a74745e 1 parent 82ec3de
@nobu nobu authored
Showing with 12 additions and 9 deletions.
  1. +4 −1 ChangeLog
  2. +2 −2 complex.c
  3. +2 −2 iseq.c
  4. +4 −4 time.c
View
5 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]
View
4 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);
/* --- */
View
4 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. */
View
8 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
Please sign in to comment.
Something went wrong with that request. Please try again.