summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorduerst <duerst@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-12-30 04:17:10 +0000
committerduerst <duerst@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-12-30 04:17:10 +0000
commitb1cf08496bd4eed402abe084552bf7dcf5a8fe09 (patch)
treeb3e0a8c82685e8e0b345c18dca5243100d79fda2
parent205cf0140db1cf0bfc91cded8b9037cf2876eadf (diff)
lib/uri/common.rb: Initialize HTML5ASCIIINCOMPAT to empty Array
to avoid error during bootstrap when encodings are not yet defined. [Bug #10678] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49069 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog6
-rw-r--r--lib/uri/common.rb4
2 files changed, 8 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index eeee7ed..d676d38 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Tue Dec 30 13:16:56 2014 Martin Duerst <bernhard+git@lsmod.de>
+
+ * 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@lsmod.de>
* ext/dbm/dbm.c (Init_dbm): [DOC] as UNIX permissions are octal
diff --git a/lib/uri/common.rb b/lib/uri/common.rb
index facca4b..20cd0f9 100644
--- a/lib/uri/common.rb
+++ b/lib/uri/common.rb
@@ -346,8 +346,8 @@ module URI
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.
#