summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-03-10 06:19:55 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-03-10 06:19:55 +0000
commita944bdd5fa7c7c2ddeae063eb567a4a9baceae5e (patch)
tree3943a9b9dc65326cfb539d607e881bdb1c5d896c /test/ruby
parent9871d88ee4b73bc4685f011b77b97228b03c5ba2 (diff)
node.c: hidden options hash
* node.c (dump_option): nd_compile_option is a hidden hash object, cannot call inspect on it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54077 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_rubyoptions.rb15
1 files changed, 7 insertions, 8 deletions
diff --git a/test/ruby/test_rubyoptions.rb b/test/ruby/test_rubyoptions.rb
index 82fc5e44e7..ea361bcf37 100644
--- a/test/ruby/test_rubyoptions.rb
+++ b/test/ruby/test_rubyoptions.rb
@@ -752,21 +752,19 @@ class TestRubyOptions < Test::Unit::TestCase
assert_in_out_err(['-p', '-e', 'sub(/t.*/){"TEST"}'], %[test], %w[TEST], [], bug7157)
end
- def assert_norun_with_rflag(opt)
+ def assert_norun_with_rflag(*opt)
bug10435 = "[ruby-dev:48712] [Bug #10435]: should not run with #{opt} option"
stderr = []
Tempfile.create(%w"bug10435- .rb") do |script|
dir, base = File.split(script.path)
script.puts "abort ':run'"
script.close
- opts = ['-C', dir, '-r', "./#{base}", opt]
- assert_in_out_err([*opts, '-ep']) do |_, e|
- stderr.concat(e)
- end
+ opts = ['-C', dir, '-r', "./#{base}", *opt]
+ _, e = assert_in_out_err([*opts, '-ep'], "", //)
+ stderr.concat(e) if e
stderr << "---"
- assert_in_out_err([*opts, base]) do |_, e|
- stderr.concat(e)
- end
+ _, e = assert_in_out_err([*opts, base], "", //)
+ stderr.concat(e) if e
end
assert_not_include(stderr, ":run", bug10435)
end
@@ -783,6 +781,7 @@ class TestRubyOptions < Test::Unit::TestCase
def test_dump_parsetree_with_rflag
assert_norun_with_rflag('--dump=parsetree')
+ assert_norun_with_rflag('--dump=parsetree', '-e', '#frozen-string-literal: true')
end
def test_dump_insns_with_rflag