From: Simon Krahnke Date: 2009-01-29T04:02:52+09:00 Subject: Re: Scope resolution operator * Stefano Crocco (2009-01-25) schrieb: > According to "The Ruby Programming Language", ::Something is a shortcut for > Object::Something. The idea is that ::Something should look up a constant > called Something in the global scope, but since ruby doesn't truly have a > global scope, it looks it up in the Object class, which is the nearest thing > in ruby to a global scope. ,---- | $ cat /tmp/scope.rb | Something = "blubb" | | module Bla | class Object | Something = "crazy" | end | | puts ::Something | puts Object::Something | end | $ ruby /tmp/scope.rb | blubb | crazy | $ `---- mfg, simon .... l