Because it's how it defined in ruby syntax:   def class; dot or color; =
method name
You can't use nesting in it. So it's limited on a lexer level.

On Aug 4, 2012, at 9:07 PM, I=F1aki Baz Castillo wrote:

> 2012/8/4 William Herry <william.herry.china / gmail.com>:
>> I know one way to define module method
>>=20
>> module Module1::Module2
>>  def self.hello
>>    puts 'HELLO'
>>  end
>> end
>=20
> Sure, but what I ask is why this works:
>=20
>  def Module1.hello ; end
>=20
> end this fails:
>=20
>  def Module1::Module2.hello ; end
>=20
>=20
>=20
> --=20
> I=F1aki Baz Castillo
> <ibc / aliax.net>
>=20