File: prevent_runtime_method_cache_busters

package info (click to toggle)
ruby-rspec 3.12.0c0e1m1s0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 6,752 kB
  • sloc: ruby: 69,818; sh: 1,861; makefile: 99
file content (15 lines) | stat: -rwxr-xr-x 487 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/env ruby

method_cache_busters = `script/list_method_cache_busters.sh`.split("\n").map(&:chomp)

if method_cache_busters.any?
  puts "=" * 80
  puts "Found #{method_cache_busters.size} new constructs that bust the method cache."
  puts "These should be eliminated or added to the `ignores` file."
  puts
  puts "For more information, see https://charlie.bz/blog/things-that-clear-rubys-method-cache"
  puts
  puts method_cache_busters.join("\n")
  puts "=" * 80
  exit(1)
end