File: prevent_runtime_method_cache_busters

package info (click to toggle)
ruby-rspec 3.5.0c3e0m0s0-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 6,312 kB
  • ctags: 4,788
  • sloc: ruby: 62,572; sh: 785; makefile: 100
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