diff options
author | Takashi Kokubun <takashikkbn@gmail.com> | 2023-12-22 21:47:35 -0800 |
---|---|---|
committer | Takashi Kokubun <takashikkbn@gmail.com> | 2023-12-22 21:48:26 -0800 |
commit | ef065102653378956f579985d10d3d4816dc87cf (patch) | |
tree | 5e8c68bb8bf5019f9dd18edbcafca08635eef1e7 | |
parent | c25705c2670ab34a2d4c993436edcf7d77e5cd92 (diff) |
RJIT: Prefer STDERR over $stderr
When $stderr is redirected, you'll have no way to see why RJIT got
broken. This reference must always be the actual stderr.
-rw-r--r-- | lib/ruby_vm/rjit/compiler.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/ruby_vm/rjit/compiler.rb b/lib/ruby_vm/rjit/compiler.rb index 964814460b..e5c3adf0ec 100644 --- a/lib/ruby_vm/rjit/compiler.rb +++ b/lib/ruby_vm/rjit/compiler.rb @@ -67,8 +67,8 @@ module RubyVM::RJIT compile_block(asm, jit:, pc:) iseq.body.jit_entry = @cb.write(asm) rescue Exception => e - $stderr.puts "#{e.class}: #{e.message}" - $stderr.puts e.backtrace + STDERR.puts "#{e.class}: #{e.message}" + STDERR.puts e.backtrace exit 1 end @@ -110,7 +110,7 @@ module RubyVM::RJIT return block.start_addr rescue Exception => e - $stderr.puts e.full_message + STDERR.puts e.full_message exit 1 end @@ -165,7 +165,7 @@ module RubyVM::RJIT return target.address rescue Exception => e - $stderr.puts e.full_message + STDERR.puts e.full_message exit 1 end |