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>' -- http://bugs.ruby-lang.org/