aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/class/inheritable_attributes.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/lib/active_support/core_ext/class/inheritable_attributes.rb')
-rw-r--r--activesupport/lib/active_support/core_ext/class/inheritable_attributes.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/activesupport/lib/active_support/core_ext/class/inheritable_attributes.rb b/activesupport/lib/active_support/core_ext/class/inheritable_attributes.rb
index 2dd0c577d1..371d074d34 100644
--- a/activesupport/lib/active_support/core_ext/class/inheritable_attributes.rb
+++ b/activesupport/lib/active_support/core_ext/class/inheritable_attributes.rb
@@ -23,7 +23,7 @@ class Class # :nodoc:
end
def class_inheritable_writer(*syms)
- options = syms.last.is_a?(Hash) ? syms.pop : {}
+ options = syms.extract_options!
syms.each do |sym|
class_eval <<-EOS
def self.#{sym}=(obj)
@@ -40,7 +40,7 @@ class Class # :nodoc:
end
def class_inheritable_array_writer(*syms)
- options = syms.last.is_a?(Hash) ? syms.pop : {}
+ options = syms.extract_options!
syms.each do |sym|
class_eval <<-EOS
def self.#{sym}=(obj)
@@ -57,7 +57,7 @@ class Class # :nodoc:
end
def class_inheritable_hash_writer(*syms)
- options = syms.last.is_a?(Hash) ? syms.pop : {}
+ options = syms.extract_options!
syms.each do |sym|
class_eval <<-EOS
def self.#{sym}=(obj)