ruby-changes:36988
From: duerst <ko1@a...>
Date: Tue, 30 Dec 2014 13:17:24 +0900 (JST)
Subject: [ruby-changes:36988] duerst:r49069 (trunk): lib/uri/common.rb: Initialize HTML5ASCIIINCOMPAT to empty Array
duerst 2014-12-30 13:17:10 +0900 (Tue, 30 Dec 2014) New Revision: 49069 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=49069 Log: lib/uri/common.rb: Initialize HTML5ASCIIINCOMPAT to empty Array to avoid error during bootstrap when encodings are not yet defined. [Bug #10678] Modified files: trunk/ChangeLog trunk/lib/uri/common.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 49068) +++ ChangeLog (revision 49069) @@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Tue Dec 30 13:16:56 2014 Martin Duerst <bernhard+git@l...> + + * lib/uri/common.rb: Initialize HTML5ASCIIINCOMPAT to empty Array + to avoid error during bootstrap when encodings are not yet defined. + [Bug #10678] + Tue Dec 30 09:29:26 2014 Bernhard M. Wiedemann <bernhard+git@l...> * ext/dbm/dbm.c (Init_dbm): [DOC] as UNIX permissions are octal Index: lib/uri/common.rb =================================================================== --- lib/uri/common.rb (revision 49068) +++ lib/uri/common.rb (revision 49069) @@ -346,8 +346,8 @@ module URI https://github.com/ruby/ruby/blob/trunk/lib/uri/common.rb#L346 TBLDECWWWCOMP_['+'] = ' ' TBLDECWWWCOMP_.freeze - HTML5ASCIIINCOMPAT = [Encoding::UTF_7, Encoding::UTF_16BE, Encoding::UTF_16LE, - Encoding::UTF_32BE, Encoding::UTF_32LE] # :nodoc: + HTML5ASCIIINCOMPAT = defined? Encoding::UTF_7 ? [Encoding::UTF_7, Encoding::UTF_16BE, Encoding::UTF_16LE, + Encoding::UTF_32BE, Encoding::UTF_32LE] : [] # :nodoc: # Encode given +str+ to URL-encoded form data. # -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/