Cgi.rb patch for javascript support

My apologies if this belongs on ruby-dev; this is my first ruby patch,
so I thought I’d solicit comment here. This patch, when applied to
cgi.rb, allows a programmer to write:

cgi.popup_menu(“NAME” => ‘name’,
“ONCHANGE” => ‘alert(“somebody changed this popup menu!”);’,
“VALUES” => [ [‘a’, ‘one’], [‘b’, ‘two’], [‘c’, ‘three’] ])

— cgi.rb.orig 2003-12-04 15:14:34.000000000 -0700
+++ cgi.rb 2003-12-04 15:38:19.000000000 -0700
@@ -1858,13 +1858,16 @@
values = name[“VALUES”]
size = name[“SIZE”].to_s if name[“SIZE”]
multiple = name[“MULTIPLE”]

  •    onchange = name["ONCHANGE"]
       name     = name["NAME"]
     else
       size = nil
       multiple = nil
    
  •    onchange = nil
     end
    
     select({ "NAME" => name, "SIZE" => size,
    
  •           "onChange" => onchange,
              "MULTIPLE" => multiple }){
       values.collect{|value|
         if value.kind_of?(String)
    

Assuming this is okay, where should I send it to get it included upstream?

-=Eric

···


Come to think of it, there are already a million monkeys on a million
typewriters, and Usenet is NOTHING like Shakespeare.
– Blair Houghton.