Issue #13539 has been updated by nagachika (Tomoyuki Chikanaga).

Backport changed from 2.2: DONTNEED, 2.3: DONTNEED, 2.4: REQUIRED to 2.2: DONTNEED, 2.3: DONTNEED, 2.4: DONE

ruby_2_4 r59511 merged revision(s) 57501,58576.

----------------------------------------
Bug #13539: uninitialized class variable @@accept_charset in #<Class:CGI> when calling CGI.unescape
https://bugs.ruby-lang.org/issues/13539#change-66029

* Author: janko (Janko Marohni)
* Status: Closed
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-darwin16]
* Backport: 2.2: DONTNEED, 2.3: DONTNEED, 2.4: DONE
----------------------------------------
When I execute this script:

~~~ ruby
require "cgi/util"
CGI.unescape("foo")
~~~

On Ruby 2.3.0 this will execute just fine, but on 2.4.1 this throws an error:

~~~
`unescape': uninitialized class variable @@accept_charset in #<Class:CGI> (NameError)
~~~

This doesn't happen when I require the whole cgi.rb standard library, only when I require cgi/util.rb. The reason why I want to require only cgi/util.rb is because I need only the URI escaping/unescaping behaviour.

  



-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>