File: prevent_runtime_method_cache_busters

package info (click to toggle)
ruby-rspec 3.9.0c2e2m1s3-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 6,612 kB
  • sloc: ruby: 67,456; sh: 1,572; makefile: 98
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