On Wed 14 Feb 2007 at 18:00:22 +0900, Robert Klemme wrote:

> Another idea: maybe the readline lib interferes with encodings somehow 
> in IRB?  What happens if you invoke your script from within IRB via "load"?

It runs as if run from the command line:

irb(main):001:0> load 'foo'
2
2

Ian
-- 
Ian Macdonald               | Man who falls in vat of molten optical
ian / caliban.org             | glass makes spectacle of self. 
http://www.caliban.org/     | 
                            | 
                            |