diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-25 09:43:23 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-25 09:43:23 +0000 |
commit | 36df55c6e4dff444d92eb5c44d2ecb65567427e6 (patch) | |
tree | d8d103c4c3220c3000aeb70d09f978d833fab673 | |
parent | 305c42739f9896602400bca08b48ae1de978d99e (diff) | |
download | ruby-36df55c6e4dff444d92eb5c44d2ecb65567427e6.tar.gz |
* iseq.c: all methods need $SAFE < 1.
vm.c: comment out debug functions.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14690 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | iseq.c | 10 | ||||
-rw-r--r-- | vm.c | 4 |
3 files changed, 18 insertions, 2 deletions
@@ -1,3 +1,9 @@ +Tue Dec 25 18:40:46 2007 Koichi Sasada <ko1@atdot.net> + + * iseq.c: all methods need $SAFE < 1. + + vm.c: comment out debug functions. + Tue Dec 25 18:27:51 2007 Tanaka Akira <akr@fsij.org> * string.c (rb_str_each_line): don't call rb_enc_codepoint with empty @@ -455,6 +455,8 @@ iseq_s_compile(int argc, VALUE *argv, VALUE self) { 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 @@ iseq_s_compile_file(int argc, VALUE *argv, VALUE self) 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 @@ static VALUE 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 @@ iseq_check(VALUE val) static VALUE iseq_eval(VALUE self) { + rb_secure(1); return rb_iseq_eval(self); } @@ -534,6 +539,7 @@ static VALUE 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 @@ ruby_iseq_disasm(VALUE self) char buff[0x200]; enum {header_minlen = 72}; + rb_secure(1); + iseq = iseqdat->iseq; size = iseqdat->iseq_size; @@ -891,6 +899,8 @@ iseq_s_disasm(VALUE klass, VALUE body) 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; @@ -1811,8 +1811,8 @@ Init_VM(void) 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 */ { |