Fix rubocop warnings

Rubocop is a syntax checker for Ruby. It helps to maintain some general
style in your code.
raise RuntimeError → fail