aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_system.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_system.rb')
-rw-r--r--test/ruby/test_system.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/ruby/test_system.rb b/test/ruby/test_system.rb
index 358fa54ef8..2a5107f70c 100644
--- a/test/ruby/test_system.rb
+++ b/test/ruby/test_system.rb
@@ -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