Project

General

Profile

Actions

Feature #502

closed

CGI::CookieをdelegateからArrayの継承へ変更

Added by xibbar (Takeyuki FUJIOKA) about 16 years ago. Updated over 13 years ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-dev:35995]

Description

=begin
Index: lib/cgi.rb

--- lib/cgi.rb (revision 18876)
+++ lib/cgi.rb (working copy)
@@ -749,8 +749,6 @@
stdoutput.print(*options)
end

  • require "delegate"
  • Class representing an HTTP cookie.

    In addition to its specific fields and methods, a Cookie instance

@@ -784,7 +782,7 @@
# cookie1.domain = 'domain'
# cookie1.expires = Time.now + 30
# cookie1.secure = true

  • class Cookie < DelegateClass(Array)
  • class Cookie < Array

    Create a new CGI::Cookie object.

これに対するテストも添付します。
CGIAltに附属するtest_cgi_cookie.rbです。
無修正で通ります。
=end


Files

test_cgi_cookie.rb (3.26 KB) test_cgi_cookie.rb xibbar (Takeyuki FUJIOKA), 08/27/2008 09:48 AM

Related issues 1 (0 open1 closed)

Related to Backport186 - Backport #229: CGI::Cookies can "get out of sync"Closedwyhaines (Kirk Haines)07/07/2008Actions
Actions #1

Updated by xibbar (Takeyuki FUJIOKA) about 16 years ago

=begin
すみません、コメントを書くのを忘れました。
http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-dev/22011
でもまつもとさんが望ましくない使い方と書いていますし、
delegateじゃなくてarrayの継承で実装した方がいいと思います。
そのパッチとテストを添付しました。
=end

Actions #2

Updated by naruse (Yui NARUSE) about 16 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

=begin
Applied in changeset r18878.
=end

Actions

Also available in: Atom PDF

Like0
Like0Like0