From: Dominik Werder Date: 2003-04-09T20:20:14+09:00 Subject: Re: Simple Question >> my question is probably a little bit stupid, but anyway it would be nice > if >> somebody could give me an answer: >> >> As everybody knows, the method puts is reachable from anywhere even from >> own classes without requiring anything. >> How can I make my own method reachable from anywhere? Where do I have to >> put them? > > simply put your method in the "Kernel" module: > > module Kernel > def test > puts "reachable from anywhere!" > end > end > > the reason is that the module Kernel is included by the Object class. This works really fine with the normal ruby interpreter but unfortunately not with mod_ruby.. I tried already to put it in 'Apache'.. Any suggestions? thanks! Dominik