Forum: Ruby-core [Backport 200 - Backport #7997][Open] undefined method `unescape' for CGI:Class

Posted by nelsnelson (Nels Nelson) (Guest)
on 2013-03-01 19:20
(Received via mailing list)
Issue #7997 has been reported by nelsnelson (Nels Nelson).

----------------------------------------
Backport #7997: undefined method `unescape' for CGI:Class
https://bugs.ruby-lang.org/issues/7997

Author: nelsnelson (Nels Nelson)
Status: Open
Priority: Normal
Assignee:
Category:
Target version:


$ 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 method `unescape' 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 `<main>'
Posted by nelsnelson (Nels Nelson) (Guest)
on 2013-03-01 19:22
(Received via mailing list)
Issue #7997 has been updated by nelsnelson (Nels Nelson).

File test.rb added


----------------------------------------
Backport #7997: undefined method `unescape' for CGI:Class
https://bugs.ruby-lang.org/issues/7997#change-37233

Author: nelsnelson (Nels Nelson)
Status: Open
Priority: Normal
Assignee:
Category:
Target version:


$ 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 method `unescape' 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 `<main>'
Posted by marcocarvalho (Marco Carvalho) (Guest)
on 2013-03-02 16:07
(Received via mailing list)
Issue #7997 has been updated by marcocarvalho (Marco  Carvalho).


CGI cookie needs CGI/core to run...

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

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


----------------------------------------
Backport #7997: undefined method `unescape' for CGI:Class
https://bugs.ruby-lang.org/issues/7997#change-37254

Author: nelsnelson (Nels Nelson)
Status: Open
Priority: Normal
Assignee:
Category:
Target version:


$ 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 method `unescape' 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 `<main>'
Posted by nelsnelson (Nels Nelson) (Guest)
on 2013-03-04 20:48
(Received via mailing list)
Issue #7997 has been updated by nelsnelson (Nels Nelson).


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!
----------------------------------------
Backport #7997: undefined method `unescape' for CGI:Class
https://bugs.ruby-lang.org/issues/7997#change-37287

Author: nelsnelson (Nels Nelson)
Status: Open
Priority: Normal
Assignee:
Category:
Target version:


$ 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 method `unescape' 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 `<main>'
Posted by devans (Daniel Evans) (Guest)
on 2013-04-05 23:27
(Received via mailing list)
Issue #7997 has been updated by devans (Daniel Evans).


A work around is to `require 'cgi/util'` which is where CGI::unescape is 
defined and causes the test script provided to work perfectly.
----------------------------------------
Bug #7997: undefined method `unescape' for CGI:Class
https://bugs.ruby-lang.org/issues/7997#change-38271

Author: nelsnelson (Nels Nelson)
Status: Open
Priority: Normal
Assignee:
Category:
Target version:
ruby -v:


$ 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 method `unescape' 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 `<main>'
Posted by charliesome (Charlie Somerville) (Guest)
on 2013-04-17 13:32
(Received via mailing list)
Issue #7997 has been updated by charliesome (Charlie Somerville).

Assignee set to xibbar (Takeyuki FUJIOKA)
ruby -v set to -


----------------------------------------
Bug #7997: undefined method `unescape' for CGI:Class
https://bugs.ruby-lang.org/issues/7997#change-38650

Author: nelsnelson (Nels Nelson)
Status: Open
Priority: Normal
Assignee: xibbar (Takeyuki FUJIOKA)
Category:
Target version:
ruby -v: -


$ 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 method `unescape' 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 `<main>'
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.