summaryrefslogtreecommitdiff
path: root/test/ruby/test_rubyoptions.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_rubyoptions.rb')
-rw-r--r--test/ruby/test_rubyoptions.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/ruby/test_rubyoptions.rb b/test/ruby/test_rubyoptions.rb
index c39a45a..9fedcc6 100644
--- a/test/ruby/test_rubyoptions.rb
+++ b/test/ruby/test_rubyoptions.rb
@@ -303,9 +303,9 @@ class TestRubyOptions < Test::Unit::TestCase
end
bug4118 = '[ruby-dev:42680]'
- assert_in_out_err(%w[], "#!/bin/sh\n""#!shebang\n""#!ruby\n""puts __LINE__\n",
+ assert_in_out_err(%w[], "#!/bin/sh\n#!shebang\n#!ruby\nputs __LINE__\n",
%w[4], [], bug4118)
- assert_in_out_err(%w[-x], "#!/bin/sh\n""#!shebang\n""#!ruby\n""puts __LINE__\n",
+ assert_in_out_err(%w[-x], "#!/bin/sh\n#!shebang\n#!ruby\nputs __LINE__\n",
%w[4], [], bug4118)
end
@@ -498,22 +498,22 @@ class TestRubyOptions < Test::Unit::TestCase
assert_in_out_err(["-we", "def foo\n eval('a=1')\nend"], "", [], [], feature3446)
assert_in_out_err(["-we", "1.times do\n a=1\nend"], "", [], [], feature3446)
assert_in_out_err(["-we", "def foo\n 1.times do\n a=1\n end\nend"], "", [], ["-e:3: warning: assigned but unused variable - a"], feature3446)
- assert_in_out_err(["-we", "def foo\n"" 1.times do |a| end\n""end"], "", [], [])
+ assert_in_out_err(["-we", "def foo\n 1.times do |a| end\nend"], "", [], [])
feature6693 = '[ruby-core:46160]'
assert_in_out_err(["-we", "def foo\n _a=1\nend"], "", [], [], feature6693)
end
def test_shadowing_variable
bug4130 = '[ruby-dev:42718]'
- assert_in_out_err(["-we", "def foo\n"" a=1\n"" 1.times do |a| end\n"" a\n""end"],
+ assert_in_out_err(["-we", "def foo\n a=1\n 1.times do |a| end\n a\nend"],
"", [], ["-e:3: warning: shadowing outer local variable - a"], bug4130)
- assert_in_out_err(["-we", "def foo\n"" a=1\n"" 1.times do |a| end\n""end"],
+ assert_in_out_err(["-we", "def foo\n a=1\n 1.times do |a| end\nend"],
"", [],
["-e:3: warning: shadowing outer local variable - a",
"-e:2: warning: assigned but unused variable - a",
], bug4130)
feature6693 = '[ruby-core:46160]'
- assert_in_out_err(["-we", "def foo\n"" _a=1\n"" 1.times do |_a| end\n""end"],
+ assert_in_out_err(["-we", "def foo\n _a=1\n 1.times do |_a| end\nend"],
"", [], [], feature6693)
end