What is significant about the "::" notation? [duplicate]
Possible Duplicate:
What is Ruby's double-colon (::) all about?
What is the "::
" telling me in this code example? I'm working thru the ruby koans and don't fully understand this code chuck.
class ::Integer
def even?
(self % 2) == 0
end
end
It's going to the root namespace.
It's the namespace resolution operator.
This S/O question has more detail:
What is Ruby's double-colon `::`?
精彩评论