aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib
diff options
context:
space:
mode:
Diffstat (limited to 'activemodel/lib')
-rw-r--r--activemodel/lib/active_model/validations.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/activemodel/lib/active_model/validations.rb b/activemodel/lib/active_model/validations.rb
index 18cd53e130..f38121c175 100644
--- a/activemodel/lib/active_model/validations.rb
+++ b/activemodel/lib/active_model/validations.rb
@@ -168,8 +168,9 @@ module ActiveModel
# Clean the +Errors+ object if instance is duped
def initialize_dup(other) # :nodoc:
@errors = nil
+ super if defined?(super)
end
-
+
# Backport dup from 1.9 so that #initialize_dup gets called
unless Object.respond_to?(:initialize_dup)
def dup # :nodoc: