From edd68a587f412ccdf15613c663acbab341d45017 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Tue, 24 Jul 2007 16:48:57 +0000 Subject: Refactored in use of extract_options! (closes #9079) [josh] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7220 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activesupport/lib/active_support/core_ext/module/attribute_accessors.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activesupport/lib/active_support/core_ext/module') diff --git a/activesupport/lib/active_support/core_ext/module/attribute_accessors.rb b/activesupport/lib/active_support/core_ext/module/attribute_accessors.rb index 8127150a96..58ff363244 100644 --- a/activesupport/lib/active_support/core_ext/module/attribute_accessors.rb +++ b/activesupport/lib/active_support/core_ext/module/attribute_accessors.rb @@ -21,7 +21,7 @@ class Module # :nodoc: end def mattr_writer(*syms) - options = syms.last.is_a?(Hash) ? syms.pop : {} + options = syms.extract_options! syms.each do |sym| class_eval(<<-EOS, __FILE__, __LINE__) unless defined? @@#{sym} -- cgit v1.2.3