Skip to content
This repository
Browse code

AS guide: Class#reachable? has been removed in 5f981ff

  • Loading branch information...
commit 5c2be6d80400bfeb80c80b966ae2f0c11d71c978 1 parent b0edc8d
Xavier Noria fxn authored
25 railties/guides/source/active_support_core_extensions.textile
Source Rendered
@@ -666,31 +666,6 @@ See aso +Object#subclasses_of+, explained in "Extensions to All Objects FIX THIS
666 666
667 667 NOTE: Defined in +active_support/core_ext/class/removal.rb+.
668 668
669   -h4. Reachable Classes
670   -
671   -By definition a non-anonymous class is reachable if its name constantized is defined, and the corresponding constant evaluates to +self+:
672   -
673   -<ruby>
674   -class C; end
675   -C.reachable? # => true
676   -
677   -phantom = Object.send(:remove_const, :C)
678   -
679   -# The class object is orphan now but it still has a name.
680   -phantom.name # => "C"
681   -
682   -# Class name no longer available as a constant.
683   -phantom.reachable? # => nil
684   -
685   -# Let's define a class named "C" again.
686   -class C; end
687   -
688   -# Class name available as a constant, but different class object.
689   -phantom.reachable? # => false
690   -</ruby>
691   -
692   -NOTE: Defined in +active_support/core_ext/class/removal.rb+.
693   -
694 669 h3. Extensions to +String+
695 670
696 671 h4. +squish+

0 comments on commit 5c2be6d

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