From: Martin Duerst Date: 2009-02-26T12:53:56+09:00 Subject: [ruby-core:22530] Re: YASNP (Yet Another Selector NamespaceProposal) At 03:46 09/02/26, Charles Oliver Nutter wrote: >I wanted to point out that having the following namespace: > >module Foo; def to_s; 'blah'; end; end >using Foo >'hello'.to_s This might be a very silly question, but how does the module/namespace Foo know that to_s is attached to class String (and strings such as 'hello')? Or is it attached to all objects used after "using Foo"? That wouldn't seem right for me, after all, Ruby is object-oriented, which means methods go on classes, not on files. Regards, Martin. #-#-# Martin J. Du"rst, Assoc. Professor, Aoyama Gakuin University #-#-# http://www.sw.it.aoyama.ac.jp mailto:duerst@it.aoyama.ac.jp