Hi (yet again :-)

On Mon, 23 Aug 2004 nobu.nokada / softhome.net wrote:

> Hi,
> 
> At Mon, 23 Aug 2004 00:59:15 +0900,
> David A. Black wrote in [ruby-core:03293]:
> > The error messages look like this (minus dates and IP addresses):
> > 
> >   Premature end of script headers: submitrcr.rb
> >   (eval):3:in `__send__': undefined method `downcase' 
> >     for nil:NilClass (NoMethodError)
> >   from (eval):3:in `gsub!'
> >   from /usr/local/lib/httpd/htdocs/rcrchive/utils.rb:85:in `initialize',
> > 
> > I don't understand the __send__, or the eval, neither of which are in
> > my code.  
> 
> How is that @text obtained?  It feels a delegator or similar.

Thanks again to Gabriele:

  $ ruby -v
  ruby 1.8.1 (2003-12-25) [i686-linux]

  $ cat cg.rb 

  require 'cgi'
  c = CGI.new
  p c["a"].gsub(/(b)/) { p $1; p $~; $1 }

  $ ruby cg.rb 
  (offline mode: enter name=value pairs on standard input)
  a=b
  ^D
  nil
  nil
  ""

I'm not 100% clear on why it does that, but that's where it's happening.


David

-- 
David A. Black
dblack / wobblini.net