From 5c97d4ff29cfd944da751f01177a3024626d57bb Mon Sep 17 00:00:00 2001 From: Mike Gunderloy Date: Sat, 25 Oct 2008 14:49:39 +0530 Subject: "raise NoMethodError" raises NoMethodError. Raise it with NoMethodError.new instead. Signed-off-by: Pratik Naik --- activerecord/lib/active_record/attribute_methods.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord/lib') diff --git a/activerecord/lib/active_record/attribute_methods.rb b/activerecord/lib/active_record/attribute_methods.rb index 1c753524de..177d156834 100644 --- a/activerecord/lib/active_record/attribute_methods.rb +++ b/activerecord/lib/active_record/attribute_methods.rb @@ -233,7 +233,7 @@ module ActiveRecord method_name = method_id.to_s if self.class.private_method_defined?(method_name) - raise NoMethodError("Attempt to call private method", method_name, args) + raise NoMethodError.new("Attempt to call private method", method_name, args) end # If we haven't generated any methods yet, generate them, then -- cgit v1.2.3