Skip to content
Browse files

this variable is used, so we don't have to use double assignments

  • Loading branch information...
1 parent 8559871 commit 920753f376fca4fc8b82b7ac07d00dcb2bbeb189 @tenderlove tenderlove committed May 15, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 activesupport/lib/active_support/core_ext/class/attribute.rb
View
2 activesupport/lib/active_support/core_ext/class/attribute.rb
@@ -71,7 +71,7 @@ class Class
def class_attribute(*attrs)
options = attrs.extract_options!
# double assignment is used to avoid "assigned but unused variable" warning
- instance_reader = instance_reader = options.fetch(:instance_accessor, true) && options.fetch(:instance_reader, true)
+ instance_reader = options.fetch(:instance_accessor, true) && options.fetch(:instance_reader, true)
instance_writer = options.fetch(:instance_accessor, true) && options.fetch(:instance_writer, true)
instance_predicate = options.fetch(:instance_predicate, true)

0 comments on commit 920753f

Please sign in to comment.
Something went wrong with that request. Please try again.