Skip to content

Commit

Permalink
Prevent new method cache busters from being added.
Browse files Browse the repository at this point in the history
  • Loading branch information
myronmarston committed Nov 14, 2013
1 parent d26ab3f commit a1346c2
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
File renamed without changes.
15 changes: 15 additions & 0 deletions script/prevent_runtime_method_cache_busters
Original file line number Diff line number Diff line change
@@ -0,0 +1,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
2 changes: 2 additions & 0 deletions script/test_all
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ fi
# https://github.com/carlhuda/bundler/issues/2382
bundle exec bin/cucumber --strict

script/prevent_runtime_method_cache_busters

# Test against other RSpec gems.

# Delete the directory for idempotency when running locally
Expand Down

0 comments on commit a1346c2

Please sign in to comment.