diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-12-01 09:17:02 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-12-01 09:17:02 +0000 |
commit | 9c1b3161f20162dc1682d758c0e4d2fc3a74745e (patch) | |
tree | 949702235feba378edd6828d9d37266509136fb8 | |
parent | 82ec3de020fb765d3d1ad8422744e39bba0f4106 (diff) | |
download | ruby-9c1b3161f20162dc1682d758c0e4d2fc3a74745e.tar.gz |
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
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | complex.c | 4 | ||||
-rw-r--r-- | iseq.c | 4 | ||||
-rw-r--r-- | time.c | 8 |
4 files changed, 12 insertions, 9 deletions
@@ -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] @@ -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); /* --- */ @@ -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. */ @@ -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 |