From ae6782315a0e14949259e3b6c8ce544e5e774ba5 Mon Sep 17 00:00:00 2001 From: matz Date: Thu, 24 Apr 2008 08:20:56 +0000 Subject: [PATCH] * ruby.c (process_options): set safe_level before loading script. [ruby-dev:34421] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16180 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ ruby.c | 2 +- version.h | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2ea4d344c2..07815672e7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Thu Apr 24 17:19:01 2008 Yukihiro Matsumoto + + * ruby.c (process_options): set safe_level before loading script. + [ruby-dev:34421] + Thu Apr 24 14:15:11 2008 Nobuyoshi Nakada * dln.c (dln_find_1): prior files with extensions to files sans diff --git a/ruby.c b/ruby.c index 5fa5092557..1c67ce262c 100644 --- a/ruby.c +++ b/ruby.c @@ -1073,6 +1073,7 @@ process_options(VALUE arg) } rb_enc_set_default_external(rb_enc_from_encoding(enc)); + rb_set_safe_level_force(safe); if (opt->e_script) { rb_encoding *eenc; if (opt->src.enc.index >= 0) { @@ -1091,7 +1092,6 @@ process_options(VALUE arg) } tree = load_file(parser, opt->script, 1, opt); } - rb_set_safe_level_force(safe); if (!tree) return Qfalse; diff --git a/version.h b/version.h index f71847da23..830df81052 100644 --- a/version.h +++ b/version.h @@ -50,7 +50,7 @@ RUBY_EXTERN const char ruby_copyright[]; RUBY_RELEASE_STR" " \ STRINGIZE(RUBY_RELEASE_NUM)") " \ "["RUBY_PLATFORM"]" -# define RUBY_COPYRIGHT \ +# define RUBY_COPYRIGHT \ "ruby - Copyright (C) " \ STRINGIZE(RUBY_BIRTH_YEAR)"-" \ STRINGIZE(RUBY_RELEASE_YEAR)" " \