From e97af583f711f138605a22d88e6d04b017257ec8 Mon Sep 17 00:00:00 2001 From: seki Date: Thu, 21 Nov 2002 14:38:37 +0000 Subject: [PATCH] * bin/erb: fix -S 4 option bug. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3073 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- bin/erb | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/bin/erb b/bin/erb index 03e7c47843..bfc86f56c8 100755 --- a/bin/erb +++ b/bin/erb @@ -60,7 +60,7 @@ class ERB require ARGV.req_arg when '-S' # sacurity level arg = ARGV.req_arg - raise "invalid security level #{arg.dump}" unless arg =~ /^[0-3]$/ + raise "invalid safe_level #{arg.dump}" unless arg =~ /^[0-4]$/ safe_level = arg.to_i when '-T' # trim mode arg = ARGV.req_arg @@ -99,7 +99,7 @@ class ERB -d set $DBEUG to true -r [library] load a library -K [kcode] specify KANJI code-set - -S [safe_level] set $SAFE (0..3) + -S [safe_level] set $SAFE (0..4) -T [trim_mode] specify trim_mode (0..2) -P disregard the lin which starts in "%" EOU @@ -121,7 +121,7 @@ EOU puts erb.src end else - erb.run + erb.run(TOPLEVEL_BINDING.taint) end end module_function :run @@ -131,5 +131,3 @@ end if __FILE__ == $0 ERB::Main.run end - -