RequireBench: When do you use it?

Upgrading an old application, I encountered the following code.

# Uncomment the following monkey patch to debug "SystemStackError: stack level too deep" during boot up
module Kernel
  def require_and_print(string)
    puts string
    require_original(string)
  end

  alias_method :require_original, :require
  alias_method :require, :require_and_print
end

This is what require_bench was written for. You don’t need to add hacks like this to your code anymore!

OK, but why is the gem better than the hack?

I’m glad you asked! Here are the top 5 reason. I could list more, but I think these suffice.

  1. 100% test coverage (line and branch).
  2. 100% test coverage.
  3. 100% test coverage.
  4. 100% test coverage.
  5. 100% test coverage.

Check it out! Oh, that reminds me.

This is my latest project to adopt my new D-in-DVCS paradigm, so check that out!

🛞 DVCS

This project does not trust any one version control hosting provider, so it abides the principles of “Distributed Version Control Systems”

Find this project on:

Any Of These DVCSs
🐙hub 🧊berg 🛖hut 🧪lab