Project

General

Profile

Backport #7997

undefined method `unescape' for CGI:Class

Added by nelsnelson (Nels Nelson) almost 7 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
[ruby-core:53081]

Description

$ ruby2.0 -v ./test.rb "_my_app_session_id=e6fafc122f84c2755310d712e5a19320; domain=.my.app.unknown.com; path=/; HttpOnly"
ruby 2.0.0dev (2013-02-08 trunk 39161) [x86_64-darwin12.2.0]
Parsing cookie string: _my_app_session_id=e6fafc122f84c2755310d712e5a19320; domain=.my.app.unknown.com; path=/; HttpOnly
/usr/local/lib/ruby/2.0.0/cgi/cookie.rb:151:in block in parse': undefined methodunescape' for CGI:Class (NoMethodError)
from /usr/local/lib/ruby/2.0.0/cgi/cookie.rb:148:in each'
from /usr/local/lib/ruby/2.0.0/cgi/cookie.rb:148:in
parse'
from ./test.rb:7:in `'


Files

test.rb (140 Bytes) test.rb Source code for demonstration example nelsnelson (Nels Nelson), 03/02/2013 03:21 AM

Associated revisions

Revision 1f2c3b8a
Added by xibbar (Takeyuki FUJIOKA) over 6 years ago

  • lib/cgi/cookie.rb(CGI::Cookie.parse): add require for standalone require 'cgi/cookie' .[Bug #7997]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40362 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 40362
Added by xibbar (Takeyuki FUJIOKA) over 6 years ago

  • lib/cgi/cookie.rb(CGI::Cookie.parse): add require for standalone require 'cgi/cookie' .[Bug #7997]

Revision 40362
Added by xibbar (Takeyuki FUJIOKA) over 6 years ago

  • lib/cgi/cookie.rb(CGI::Cookie.parse): add require for standalone require 'cgi/cookie' .[Bug #7997]

Revision 40362
Added by xibbar (Takeyuki FUJIOKA) over 6 years ago

  • lib/cgi/cookie.rb(CGI::Cookie.parse): add require for standalone require 'cgi/cookie' .[Bug #7997]

Revision 40362
Added by xibbar (Takeyuki FUJIOKA) over 6 years ago

  • lib/cgi/cookie.rb(CGI::Cookie.parse): add require for standalone require 'cgi/cookie' .[Bug #7997]

Revision 40362
Added by xibbar (Takeyuki FUJIOKA) over 6 years ago

  • lib/cgi/cookie.rb(CGI::Cookie.parse): add require for standalone require 'cgi/cookie' .[Bug #7997]

Revision 40362
Added by xibbar (Takeyuki FUJIOKA) over 6 years ago

  • lib/cgi/cookie.rb(CGI::Cookie.parse): add require for standalone require 'cgi/cookie' .[Bug #7997]

Revision 62ff805f
Added by nagachika (Tomoyuki Chikanaga) over 6 years ago

merge revision(s) 40362: [Backport #7997]

    * lib/cgi/cookie.rb(CGI::Cookie.parse): add require

for standalone require 'cgi/cookie' .[Bug #7997]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@40389 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 40389
Added by nagachika (Tomoyuki Chikanaga) over 6 years ago

merge revision(s) 40362: [Backport #7997]

* lib/cgi/cookie.rb(CGI::Cookie.parse): add require

for standalone require 'cgi/cookie' .[Bug #7997]

History

Updated by marcocarvalho (Marco Carvalho) almost 7 years ago

CGI cookie needs CGI/core to run...

open "lib/ruby/2.0.0/cgi.rb" and see that cgi/cookie is loaded after cgi/core

I think it's not an error, 'cgi/cookie' depends on 'cgi/core'.

Updated by nelsnelson (Nels Nelson) almost 7 years ago

No. I tried that, and the same error occurs, despite including the

require 'cgi/core'

line before the "require 'cgi/cookie'" line.

Please test and confirm your suggestions and include source code when suggesting contrarian points of view. Thank you for your assistance!

#4

Updated by nagachika (Tomoyuki Chikanaga) over 6 years ago

  • Tracker changed from Backport to Bug
  • Project changed from Backport200 to Ruby master

The project "Backport 200" is for backport tickets.
I'll move this ticket to "ruby-trunk".

Thanks.

Updated by devans (Daniel Evans) over 6 years ago

A work around is to require 'cgi/util' which is where CGI::unescape is defined and causes the test script provided to work perfectly.

Updated by charliesome (Charlie Somerville) over 6 years ago

  • Assignee set to xibbar (Takeyuki FUJIOKA)
  • ruby -v set to -
#7

Updated by xibbar (Takeyuki FUJIOKA) over 6 years ago

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

This issue was solved with changeset r40362.
Nels, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


  • lib/cgi/cookie.rb(CGI::Cookie.parse): add require for standalone require 'cgi/cookie' .[Bug #7997]
#8

Updated by nagachika (Tomoyuki Chikanaga) over 6 years ago

  • Tracker changed from Bug to Backport
  • Project changed from Ruby master to Backport200
  • Status changed from Closed to Assigned
  • Assignee changed from xibbar (Takeyuki FUJIOKA) to nagachika (Tomoyuki Chikanaga)
#9

Updated by nagachika (Tomoyuki Chikanaga) over 6 years ago

  • Status changed from Assigned to Closed

This issue was solved with changeset r40389.
Nels, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


merge revision(s) 40362: [Backport #7997]

* lib/cgi/cookie.rb(CGI::Cookie.parse): add require

for standalone require 'cgi/cookie' .[Bug #7997]

Also available in: Atom PDF