Strange cgi.rb <--> StringIO problem 
Author Message
 Strange cgi.rb <--> StringIO problem

Hi,

I hope someone can help me figure out this strange behaviour because
I've been at it for hours ...

_Problem:_
When reading multipart data with cgi.rb I get an initialization
error: "undefined method `binmode' for #<StringIO:0x4032df14>"
at about line 657 in cgi.rb.

Investigation reveals that the method binmode does not exist on my
StringIO because it is not the standard StringIO (I don't have it
installed); in irb StringIO is not defined and cannot be loaded. In
cgi.rb however StringIO *is* defined and StringIO.superclass returns
'Object' (and not 'Data' as one would expect).

Does anyone know what is going on ?

_My configuration:_
Debian GNU/Linux (unstable)
ruby           1.6.8-3
libruby        1.6.8-3

$LOAD_PATH (in irb and cgi.rb):
    /usr/local/lib/site_ruby/1.6
    /usr/local/lib/site_ruby/1.6/i386-linux
    /usr/local/lib/site_ruby
    /usr/lib/ruby/1.6
    /usr/lib/ruby/1.6/i386-linux

Puzzled,
Simon

P.S.: In previous versions cgi.rb did not use StringIO (only TempFile)
and I didn't have this problem.
--
Lord, what fools these mortals be!
                -- William Shakespeare, "A Midsummer-Night's Dream"



Fri, 15 Jul 2005 03:46:31 GMT  
 Strange cgi.rb <--> StringIO problem
Note that installing the shim package (that contains StringIO) solved
the problem. I'd still like to know what was going on :O)

Simon
--
Lord, what fools these mortals be!
                -- William Shakespeare, "A Midsummer-Night's Dream"



Fri, 15 Jul 2005 04:23:47 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. ><><><><>Heeeeeeeeeeeeeeelp on INT 14!><><><><><>

2. <<<<<YOU MUST CHECK THIS OUT >>>>>>>>>> 2103

3. <><><> FLOODFILL <><><>

4. >>>HELP, DECOMPILER<<<

5. <<<XXX Password>>>

6. >>>>>>>>>>>>>>>>>>>HEY!<<<<<<<<<<<<<<<<<<<<<<<

7. <<<XXX Password>>>

8. ??? <<<<<<<<<<<<<<<<<<<< RGB 4 MMX >>>>>>>>>>>>>>>>>>>>>>>?

9. <<<XXX Password>>>

10. ??? <<<<<<<<<<<<<<<<<<<< RGB 4 MMX >>>>>>>>>>>>>>>>>>>>>>>?

11. DataEase problem - <Argh><HELP!>

 

 
Powered by phpBB® Forum Software