ruby-changes:3197
From: ko1@a...
Date: 25 Dec 2007 18:43:39 +0900
Subject: [ruby-changes:3197] ko1 - Ruby:r14690 (trunk): * iseq.c: all methods need $SAFE < 1.
ko1 2007-12-25 18:43:23 +0900 (Tue, 25 Dec 2007) New Revision: 14690 Modified files: trunk/ChangeLog trunk/iseq.c trunk/vm.c Log: * iseq.c: all methods need $SAFE < 1. vm.c: comment out debug functions. http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=14690&r2=14689 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/iseq.c?r1=14690&r2=14689 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/vm.c?r1=14690&r2=14689 Index: ChangeLog =================================================================== --- ChangeLog (revision 14689) +++ ChangeLog (revision 14690) @@ -1,3 +1,9 @@ +Tue Dec 25 18:40:46 2007 Koichi Sasada <ko1@a...> + + * iseq.c: all methods need $SAFE < 1. + + vm.c: comment out debug functions. + Tue Dec 25 18:27:51 2007 Tanaka Akira <akr@f...> * string.c (rb_str_each_line): don't call rb_enc_codepoint with empty Index: iseq.c =================================================================== --- iseq.c (revision 14689) +++ iseq.c (revision 14690) @@ -455,6 +455,8 @@ { VALUE src, file = Qnil, line = INT2FIX(1), opt = Qnil; + rb_secure(1); + rb_scan_args(argc, argv, "13", &src, &file, &line, &opt); file = file == Qnil ? rb_str_new2("<compiled>") : file; line = line == Qnil ? INT2FIX(1) : line; @@ -472,6 +474,7 @@ const char *fname; rb_compile_option_t option; + rb_secure(1); rb_scan_args(argc, argv, "11", &file, &opt); fname = StringValueCStr(file); @@ -488,6 +491,7 @@ iseq_s_compile_option_set(VALUE self, VALUE opt) { rb_compile_option_t option; + rb_secure(1); make_compile_option(&option, opt); COMPILE_OPTION_DEFAULT = option; return opt; @@ -513,6 +517,7 @@ static VALUE iseq_eval(VALUE self) { + rb_secure(1); return rb_iseq_eval(self); } @@ -534,6 +539,7 @@ iseq_to_a(VALUE self) { rb_iseq_t *iseq = iseq_check(self); + rb_secure(1); return iseq_data_to_ary(iseq); } @@ -792,6 +798,8 @@ char buff[0x200]; enum {header_minlen = 72}; + rb_secure(1); + iseq = iseqdat->iseq; size = iseqdat->iseq_size; @@ -891,6 +899,8 @@ NODE *node; VALUE ret = Qnil; + rb_secure(1); + if ((node = rb_method_body(body)) != 0) { if (nd_type(node) == RUBY_VM_METHOD_NODE) { VALUE iseqval = (VALUE)node->nd_body; Index: vm.c =================================================================== --- vm.c (revision 14689) +++ vm.c (revision 14690) @@ -1811,8 +1811,8 @@ rb_define_const(rb_cVM, "INSTRUCTION_NAMES", insns_name_array()); /* debug functions ::VM::SDR(), ::VM::NSDR() */ - rb_define_singleton_method(rb_cVM, "SDR", sdr, 0); - rb_define_singleton_method(rb_cVM, "NSDR", nsdr, 0); + /* rb_define_singleton_method(rb_cVM, "SDR", sdr, 0); */ + /* rb_define_singleton_method(rb_cVM, "NSDR", nsdr, 0); */ /* VM bootstrap: phase 2 */ { -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml