ruby/bootstraptest
Aaron Patterson 1271ff72d5 Don't call Warning.warn unless the category is enabled
The warning category should be enabled if we want to call
`Warning.warn`.

This commit speeds up the following benchmark:

```ruby
eval "def test; " +
  1000.times.map { "'  '.chomp!" }.join(";") + "; end"

def run_benchmark count
  i = 0
  while i < count
    start = Process.clock_gettime(Process::CLOCK_MONOTONIC)
    yield
    ms = Process.clock_gettime(Process::CLOCK_MONOTONIC) - start
    puts "itr ##{i}: #{(ms * 1000).to_i}ms"
    i += 1
  end
end

run_benchmark(25) do
  250.times do
    test
  end
end
```

On `master` this runs at about 92ms per iteration. With this patch, it
is 7ms per iteration.

[Bug #20573]
2024-06-11 14:54:15 -07:00
..
pending.rb Moved already resolved test 2020-04-27 10:39:07 +09:00
runner.rb respect RUBY_TEST_TIMEOUT_SCALE 2024-06-10 13:32:14 +09:00
test_attr.rb Revert "Revert "This commit implements the Object Shapes technique in CRuby."" 2022-10-11 08:40:56 -07:00
test_autoload.rb support concurrent btest execution 2022-02-06 03:05:47 +09:00
test_block.rb
test_class.rb
test_constant_cache.rb Finer-grained constant cache invalidation (take 2) 2022-04-01 14:48:22 -04:00
test_env.rb fallback env encoding to ASCII-8BIT 2018-09-26 17:24:00 +00:00
test_eval.rb Refactor frozen_string_literal check during compilation 2024-03-15 15:52:33 +01:00
test_exception.rb Do not include a backtick in error messages and backtraces 2024-02-15 18:42:31 +09:00
test_fiber.rb support concurrent btest execution 2022-02-06 03:05:47 +09:00
test_finalizer.rb Test finalizer is ran in bootstraptest 2024-04-01 10:26:16 -04:00
test_flip.rb
test_flow.rb Ensure test suite is compatible with --frozen-string-literal 2024-03-14 17:56:15 +01:00
test_fork.rb bootstraptest/test_fork.rb: Stop too restrict NPROC test temporarily 2018-01-09 08:05:40 +00:00
test_gc.rb RJIT: Streamline RJIT enablement check 2023-12-21 14:32:03 -08:00
test_insns.rb Ensure test suite is compatible with --frozen-string-literal 2024-03-14 17:56:15 +01:00
test_io.rb omit random failure in bootstraptest with freebsd 2022-09-06 16:27:12 +09:00
test_jump.rb Ensure test suite is compatible with --frozen-string-literal 2024-03-14 17:56:15 +01:00
test_literal.rb Explicitly assert that redefined backquote method is called 2024-02-17 17:16:17 +09:00
test_literal_suffix.rb [PRISM] Enhance syntax error message extraction in test_literal_suffix btest 2024-04-03 17:34:12 -04:00
test_load.rb Skip a flaky test that might not work 2023-03-17 09:06:52 -07:00
test_marshal.rb
test_massign.rb
test_method.rb [Bug #20218] Reject keyword arguments in index 2024-03-17 13:20:23 +09:00
test_objectspace.rb Use a monotonically increasing number for object_id 2019-11-07 09:31:07 -08:00
test_proc.rb Make proc/Proc.new without block an error instead of warning 2020-06-10 17:49:54 -07:00
test_ractor.rb Fix interrupts during Ractor.select 2024-05-05 15:14:53 +00:00
test_rjit.rb RJIT: Fix unwanted shadowing in set_local_type 2023-12-21 15:48:37 -08:00
test_string.rb
test_struct.rb
test_syntax.rb Skip flaky RJIT tests 2024-06-03 16:50:43 -07:00
test_thread.rb RJIT: Streamline RJIT enablement check 2023-12-21 14:32:03 -08:00
test_yjit.rb Don't call Warning.warn unless the category is enabled 2024-06-11 14:54:15 -07:00
test_yjit_30k_ifelse.rb * append newline at EOF. [ci skip] 2021-10-21 08:12:53 +09:00
test_yjit_30k_methods.rb * append newline at EOF. [ci skip] 2021-10-21 08:12:53 +09:00
test_yjit_rust_port.rb Rust YJIT 2022-04-27 11:00:22 -04:00