lib/rack/request.rb in rack-2.0.1 vs lib/rack/request.rb in rack-2.0.2
- old
+ new
@@ -420,21 +420,21 @@
ip =~ /\A127\.0\.0\.1\Z|\A(10|172\.(1[6-9]|2[0-9]|30|31)|192\.168)\.|\A::1\Z|\Afd[0-9a-f]{2}:.+|\Alocalhost\Z|\Aunix\Z|\Aunix:/i
end
# shortcut for <tt>request.params[key]</tt>
def [](key)
- if $verbose
+ if $VERBOSE
warn("Request#[] is deprecated and will be removed in a future version of Rack. Please use request.params[] instead")
end
params[key.to_s]
end
# shortcut for <tt>request.params[key] = value</tt>
#
# Note that modifications will not be persisted in the env. Use update_param or delete_param if you want to destructively modify params.
def []=(key, value)
- if $verbose
+ if $VERBOSE
warn("Request#[]= is deprecated and will be removed in a future version of Rack. Please use request.params[]= instead")
end
params[key.to_s] = value
end