Skip to content
Browse files

fix remove_constant

  • Loading branch information...
1 parent 36ee580 commit 7185607dd1574305b8a8082e223c05f051106b49 Daniel Arnfield committed Nov 23, 2012
Showing with 1 addition and 0 deletions.
  1. +1 −0 activesupport/lib/active_support/dependencies.rb
View
1 activesupport/lib/active_support/dependencies.rb
@@ -640,6 +640,7 @@ def to_constant_name(desc) #:nodoc:
end
def remove_constant(const) #:nodoc:
+ return false unless qualified_const_defined? const
# Normalize ::Foo, ::Object::Foo, Object::Foo, Object::Object::Foo, etc. as Foo.
normalized = const.to_s.sub(/\A::/, '')
normalized.sub!(/\A(Object::)+/, '')

0 comments on commit 7185607

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