mirror of
https://github.com/ruby/ruby.git
synced 2025-09-23 20:44:00 +02:00
* process.c (proc_exec_v, proc_spawn_v): try to execute with sh if
no shebang. [ruby-core:32745] [EXPERIMENTAL] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29695 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
ee388f6ee2
commit
d0553ffbb5
4 changed files with 55 additions and 7 deletions
|
@ -91,4 +91,15 @@ class TestSystem < Test::Unit::TestCase
|
|||
def test_empty_evstr
|
||||
assert_equal("", eval('"#{}"', nil, __FILE__, __LINE__), "[ruby-dev:25113]")
|
||||
end
|
||||
|
||||
def test_fallback_to_sh
|
||||
Dir.mktmpdir("ruby_script_tmp") {|tmpdir|
|
||||
tmpfilename = "#{tmpdir}/ruby_script_tmp.#{$$}"
|
||||
open(tmpfilename, "w") {|f|
|
||||
f.puts ": ;"
|
||||
f.chmod(0755)
|
||||
}
|
||||
assert_equal(true, system(tmpfilename), '[ruby-core:32745]')
|
||||
}
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue