From: Radek Hnilica Date: 2003-01-06T15:39:47+09:00 Subject: Re: Few question about IO I would say Happy XMas to all, but I know that I don't get to net till january. In article , Greg Millam wrote: > $ ruby -e 'puts ARGF.class' > Object > > -- > foo.rb: > > def Object > def getw > getc + 256*getc > end > end > > $ruby -r foo -e 'puts ARGF.getw' >< hi > 26984 Thanks. In your code is an error. I do not know why it work for ya. In my script I wrote: # Extending class Object with new methods. It's an dirty hack. class Object def getw getc + 256*getc end end and it works. Thanks. Only one thing. the method getc is not a method of class Object. Looking in classes, the right Class to exted is IO which has method getc. But trying exted it does no work as you can see in my firts post. -- Radek Hnilica ======================================= No matter how far down the wrong road you've gone, turn back. Turkish proverb