aboutsummaryrefslogtreecommitdiffstats
path: root/template
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-11-22 06:42:14 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-11-22 06:42:14 +0000
commitb191bd6ed822391a0c129e480c1c0aa01a1f4982 (patch)
tree704766bb49e399c2e74a4c3e10b4fe37bc30abca /template
parent5215c6b9660ce8f8c34a5457a8f5f46186dda6ca (diff)
downloadruby-b191bd6ed822391a0c129e480c1c0aa01a1f4982.tar.gz
fake.rb.in: block comment
* template/fake.rb.in: move shell code inside a block comment. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52709 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'template')
-rw-r--r--template/fake.rb.in15
1 files changed, 8 insertions, 7 deletions
diff --git a/template/fake.rb.in b/template/fake.rb.in
index 325fa88e3c..5e95530c38 100644
--- a/template/fake.rb.in
+++ b/template/fake.rb.in
@@ -15,14 +15,15 @@ if inc = arg['i']
end
end
%>baseruby="<%=arg['BASERUBY']%>"
-ruby="${RUBY-$baseruby}"
+_\
+=begin
_=
-"eval" "{" \
-"`expr \"$ruby\" : echo > /dev/null || echo exec`" \
-"$ruby" '-r"`expr \"$0\" : / > /dev/null || pwd`/${0#/}" "$@";' \
-"}" || "exit" "$?"
-_=baseruby
-ruby=ruby
+ruby="${RUBY-$baseruby}"
+case "$ruby" in "echo "*) $ruby; exit $?;; esac
+case "$0" in /*) r=-r"$0";; *) r=-r"./$0";; esac
+exec $ruby "$r" "$@"
+=end
+=baseruby
class Object
remove_const :CROSS_COMPILING if defined?(CROSS_COMPILING)
CROSS_COMPILING = RUBY_PLATFORM