From: Radek Hnilica Date: 2003-01-06T14:57:20+09:00 Subject: Re: Few question about IO On Thu, Dec 19, 2002 at 05:41:46PM +0900, Greg Millam wrote: > foo.rb: > > def Object > def getw > getc + 256*getc > end > end > > $ruby -r foo -e 'puts ARGF.getw' > < hi > 26984 > Looking into ruby source, especially io I found that the correct place for getw method seems to be a Kernel module. # Extending module Kernel with new methods. module Kernel def getw getc + 256*getc end end if $0 == __FILE__ puts "Brej ve��r, statk��i! Hled�m do trubky: " + " a vid�m:" puts ARGF.getw end it works for me. -- Radek Hnilica ======================================= No matter how far down the wrong road you've gone, turn back. Turkish proverb