[ruby-core:80986] [Ruby trunk Bug#13539] uninitialized class variable @@accept_charset in #<Class:CGI> when calling CGI.unescape

From: janko.marohnic@...
Date: 2017-05-03 05:08:22 UTC
List: ruby-core #80986
Issue #13539 has been reported by janko (Janko Marohnić).

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

* Author: janko (Janko Marohnić)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-darwin16]
* Backport: 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: UNKNOWN
----------------------------------------
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>

In This Thread

Prev Next