aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAkira Matsuda <ronnie@dio.jp>2017-01-12 17:16:37 +0900
committerAkira Matsuda <ronnie@dio.jp>2017-01-12 17:45:37 +0900
commitd688814a67f4b61aafeddb5142dcc645be3df81a (patch)
tree3f490038c8e1af8127e263148f971a2cf9e01bec
parent033f6540270ea84e7579a585c657ed2c3bcf0ee0 (diff)
downloadrails-d688814a67f4b61aafeddb5142dcc645be3df81a.tar.gz
rails-d688814a67f4b61aafeddb5142dcc645be3df81a.tar.bz2
rails-d688814a67f4b61aafeddb5142dcc645be3df81a.zip
beginrescueend
-rw-r--r--activerecord/lib/active_record/coders/yaml_column.rb8
1 files changed, 3 insertions, 5 deletions
diff --git a/activerecord/lib/active_record/coders/yaml_column.rb b/activerecord/lib/active_record/coders/yaml_column.rb
index 3a04a10fc9..4b06987f08 100644
--- a/activerecord/lib/active_record/coders/yaml_column.rb
+++ b/activerecord/lib/active_record/coders/yaml_column.rb
@@ -38,11 +38,9 @@ module ActiveRecord
private
def check_arity_of_constructor
- begin
- load(nil)
- rescue ArgumentError
- raise ArgumentError, "Cannot serialize #{object_class}. Classes passed to `serialize` must have a 0 argument constructor."
- end
+ load(nil)
+ rescue ArgumentError
+ raise ArgumentError, "Cannot serialize #{object_class}. Classes passed to `serialize` must have a 0 argument constructor."
end
end
end