Permalink
Browse files

Add explanation for :: prefix

  • Loading branch information...
1 parent 1e66b23 commit d3f655a34406d6b7391f98b99611d1faf9407f9e @radar radar committed Sep 20, 2010
Showing with 9 additions and 0 deletions.
  1. +3 −0 explanations/colon3.md
  2. +1 −0 fixtures/colon3.rb
  3. +5 −0 processor.rb
@@ -0,0 +1,3 @@
+## :: prefix
+
+When a constant is prefixed with `::` it means that Ruby should look for this constant at the root level.
View
@@ -0,0 +1 @@
+::Foo
View
@@ -117,6 +117,11 @@ def process_cvdecl(exp)
def process_if(exp)
mark(:if) + super
end
+
+ # ::Foo
+ def process_colon3(exp)
+ mark(:colon3) + super
+ end
CALLS = [:require, :attr_accessor, :attr_reader, :attr_writer, :include, :extend]
SPECIALS = [:colon2]

0 comments on commit d3f655a

Please sign in to comment.