summaryrefslogtreecommitdiff
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.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/ruby/test_system.rb b/test/ruby/test_system.rb
index 0fbad0af33..1819982250 100644
--- a/test/ruby/test_system.rb
+++ b/test/ruby/test_system.rb
@@ -37,7 +37,7 @@ class TestSystem < Test::Unit::TestCase
tmp = open(tmpfilename, "w")
tmp.print "this is a leading junk\n";
tmp.print "#! /usr/local/bin/ruby -s\n";
- tmp.print "print $zzz\n";
+ tmp.print "print $zzz if defined? $zzz\n";
tmp.print "__END__\n";
tmp.print "this is a trailing junk\n";
tmp.close
@@ -49,7 +49,7 @@ class TestSystem < Test::Unit::TestCase
tmp.print "#! /non/exist\\interpreter?/./to|be:ignored\n";
tmp.print "this is a leading junk\n";
tmp.print "#! /usr/local/bin/ruby -s\n";
- tmp.print "print $zzz\n";
+ tmp.print "print $zzz if defined? $zzz\n";
tmp.print "__END__\n";
tmp.print "this is a trailing junk\n";
tmp.close