CGI#[key]が存在しないときの挙動

e$B$3$s$K$A$O!#e(B
[email protected]$H?=$7$^$9!#e(B

CGI e$B$Ne(B self[key] e$B$N5sF0$G$9$,!"e(B
http://www.ruby-lang.org/ja/man/?cmd=view;name=cgi#class.20CGI
e$B$r8+$k$H!"e(B

ruby 1.8 feature: e$B$^$?e(B key e$B$KBP1~$9$k%Q%i%a!<%?$,e(B
e$BB8:_$7$J$+$C$?>l9g!"e(Bnil e$B$G$O$J$/e(B
e$B$rJV$9$h$&$K$J$C$F$$$^$9!#e(B

e$B$H=q$$$F$"$j$^$9$,!"%(%i!<$K$J$j$^$9!#e(B

e$B$3$&$G$7$g$&$+e(B?

cgi.rb.20070428 2007-04-28 16:08:22.000000000 +0900
+++ cgi.rb 2007-04-28 16:09:12.000000000 +0900
@@ -1163,6 +1163,7 @@
# retrieved; use #params() to get the array of values.
def
params = @params[key]

  •  return '' unless params
     value = params[0]
     if @multipart
       if value
    

e$B$43NG$/[email protected]$5$$!#e(B


Kentaro KAWAMOTO
mailto:[email protected]

e$BKNIt$G$9!#e(B

Kentaro KAWAMOTO wrote:

e$B$H=q$$$F$"$j$^$9$,!"%(%i!<$K$J$j$^$9!#e(B

e$B$3$&$G$7$g$&$+e(B?

e$B<h$j9~$^$;[email protected]$-$^$9!#$4Js9p$"$j$,$H$&$4$6$$$^$9!#e(B

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs