Created
October 22, 2013 22:40
-
-
Save zilkey/7109439 to your computer and use it in GitHub Desktop.
Revisions
-
zilkey created this gist
Oct 22, 2013 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,21 @@ module Foo class Bar end private_constant :Bar end module Foo p Bar.new # => works fine because we're scoped to Foo class Baz p Bar.new # => still fine, because we're still scoped to Foo end end begin Foo::Bar # => private constant Foo::Bar referenced rescue Exception => e puts e.message end