From a03ab8cef8c712cad3dafd06c1b483782a1c0eb5 Mon Sep 17 00:00:00 2001 From: Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> Date: Fri, 22 Mar 2013 14:00:06 -0300 Subject: Remove exception variable from rescue block Just raising from the rescue block will re-raise the exception, so the variable is not necessary. --- activemodel/lib/active_model/secure_password.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'activemodel') diff --git a/activemodel/lib/active_model/secure_password.rb b/activemodel/lib/active_model/secure_password.rb index abbf96650e..474cb0aea0 100644 --- a/activemodel/lib/active_model/secure_password.rb +++ b/activemodel/lib/active_model/secure_password.rb @@ -46,9 +46,9 @@ module ActiveModel begin gem 'bcrypt-ruby', '~> 3.0.0' require 'bcrypt' - rescue LoadError => e + rescue LoadError $stderr.puts "You don't have bcrypt-ruby installed in your application. Please add it to your Gemfile and run bundle install" - raise e + raise end attr_reader :password -- cgit v1.2.3