diff options
author | Yuta Saito <kateinoigakukun@gmail.com> | 2021-12-13 16:48:57 +0900 |
---|---|---|
committer | Yusuke Endoh <mame@ruby-lang.org> | 2021-12-16 16:16:40 +0900 |
commit | 332d1e52e62735ff16e5fb9207ce86695369555d (patch) | |
tree | bbf05dd6dae54073ed81c405436d69673311358b /bootstraptest/test_jump.rb | |
parent | 69a7eaae389b49eb2a99c1c44c11b3d5004d186f (diff) |
btest: assign $stderr = STDOUT instead of IO#reopen to be more portable
`IO#reopen` internally uses dup syscall but some platforms don't support
the syscall. re-assigning `$stderr` is enough to capture the interpreter's
errors and warnings.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/5255
Diffstat (limited to 'bootstraptest/test_jump.rb')
-rw-r--r-- | bootstraptest/test_jump.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bootstraptest/test_jump.rb b/bootstraptest/test_jump.rb index 18a2737ea3..d07c47a56d 100644 --- a/bootstraptest/test_jump.rb +++ b/bootstraptest/test_jump.rb @@ -147,7 +147,7 @@ assert_equal %q{131}, %q{ } } assert_match %r{Invalid retry}, %q{ -STDERR.reopen(STDOUT) +$stderr = STDOUT begin eval %q{ 1.times{ @@ -297,7 +297,7 @@ assert_equal "true", %q{ }, '[ruby-core:21379]' assert_match %r{Invalid yield}, %q{ -STDERR.reopen(STDOUT) +$stderr = STDOUT begin eval %q{ class Object |