Permalink
Browse files

Use `const_defined?` so that it only checks withing the scope of URI.

  • Loading branch information...
1 parent 175b803 commit a48eda501724eaf24665a8c8d3b10c5325b7c395 @benhamill benhamill committed Mar 7, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/rack/backports/uri/common_192.rb
View
2 lib/rack/backports/uri/common_192.rb
@@ -66,6 +66,6 @@ def self.decode_www_form_component(str, enc=Encoding::UTF_8)
str.gsub(/\+|%\h\h/, TBLDECWWWCOMP_).force_encoding(enc)
end
- remove_const :WFKV_ if defined?(WFKV_)
+ remove_const :WFKV_ if const_defined?(:WFKV_)
WFKV_ = '(?:[^%#=;&]*(?:%\h\h[^%#=;&]*)*)' # :nodoc:
end

0 comments on commit a48eda5

Please sign in to comment.