Permalink
Browse files

Merge pull request #10909 from dockyard/master

Use symbols instead of strings in ActiveSupport::Concern
  • Loading branch information...
2 parents 161c3af + 748d3f3 commit b296edd2d89623f97218fd1693b7a188b01e2171 @carlosantoniodasilva carlosantoniodasilva committed Jul 3, 2013
Showing with 6 additions and 6 deletions.
  1. +6 −6 activesupport/lib/active_support/concern.rb
@@ -105,25 +105,25 @@ def initialize
end
def self.extended(base) #:nodoc:
- base.instance_variable_set("@_dependencies", [])
+ base.instance_variable_set(:@_dependencies, [])
end
def append_features(base)
- if base.instance_variable_defined?("@_dependencies")
- base.instance_variable_get("@_dependencies") << self
+ if base.instance_variable_defined?(:@_dependencies)
+ base.instance_variable_get(:@_dependencies) << self
return false
else
return false if base < self
@_dependencies.each { |dep| base.send(:include, dep) }
super
- base.extend const_get("ClassMethods") if const_defined?("ClassMethods")
- base.class_eval(&@_included_block) if instance_variable_defined?("@_included_block")
+ base.extend const_get(:ClassMethods) if const_defined?(:ClassMethods)
+ base.class_eval(&@_included_block) if instance_variable_defined?(:@_included_block)
end
end
def included(base = nil, &block)
if base.nil?
- raise MultipleIncludedBlocks if instance_variable_defined?("@_included_block")
+ raise MultipleIncludedBlocks if instance_variable_defined?(:@_included_block)
@_included_block = block
else

0 comments on commit b296edd

Please sign in to comment.