mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* bin/erb: fix -S 4 option bug.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3073 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
f80af5150a
commit
e97af583f7
1 changed files with 3 additions and 5 deletions
8
bin/erb
8
bin/erb
|
@ -60,7 +60,7 @@ class ERB
|
||||||
require ARGV.req_arg
|
require ARGV.req_arg
|
||||||
when '-S' # sacurity level
|
when '-S' # sacurity level
|
||||||
arg = ARGV.req_arg
|
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
|
safe_level = arg.to_i
|
||||||
when '-T' # trim mode
|
when '-T' # trim mode
|
||||||
arg = ARGV.req_arg
|
arg = ARGV.req_arg
|
||||||
|
@ -99,7 +99,7 @@ class ERB
|
||||||
-d set $DBEUG to true
|
-d set $DBEUG to true
|
||||||
-r [library] load a library
|
-r [library] load a library
|
||||||
-K [kcode] specify KANJI code-set
|
-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)
|
-T [trim_mode] specify trim_mode (0..2)
|
||||||
-P disregard the lin which starts in "%"
|
-P disregard the lin which starts in "%"
|
||||||
EOU
|
EOU
|
||||||
|
@ -121,7 +121,7 @@ EOU
|
||||||
puts erb.src
|
puts erb.src
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
erb.run
|
erb.run(TOPLEVEL_BINDING.taint)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
module_function :run
|
module_function :run
|
||||||
|
@ -131,5 +131,3 @@ end
|
||||||
if __FILE__ == $0
|
if __FILE__ == $0
|
||||||
ERB::Main.run
|
ERB::Main.run
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue