summaryrefslogtreecommitdiff
path: root/lib/uri/common.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/uri/common.rb')
-rw-r--r--lib/uri/common.rb4
1 files changed, 2 insertions, 2 deletions
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.
#