Issue #4572 has been reported by John Firebaugh.

----------------------------------------
Bug #4572: URI.encode_www_form_component and decode_www_form_component are not threadsafe
http://redmine.ruby-lang.org/issues/4572

Author: John Firebaugh
Status: Open
Priority: Normal
Assignee: 
Category: 
Target version: 
ruby -v: ruby 1.9.2p180 (2011-02-18 revision 30909) [x86_64-darwin10.7.0]


The initializations of TBLENCWWWCOMP_ and TBLDECWWWCOMP_ suffer from an obvious race condition. If multiple threads enter either the function for the first time, it may produce unexpected results. The initializations should be done at class scope or be protected by a mutex.


-- 
http://redmine.ruby-lang.org