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¨╬ do trubky: " + " a vid¨╬:"
    puts ARGF.getw
end

it works for me.

-- 
Radek Hnilica <Radek at Hnilica dot CZ>
=======================================
No matter how far down the wrong road you've gone, turn back.
						Turkish proverb