summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-02-04 00:02:53 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-02-04 00:02:53 +0000
commit50f6e01b4444aa1a1004278ff3d7b0c1d4978fa2 (patch)
treeaf21a594bc7e8f0acba1c340ead80b003157c610 /lib
parent8f655cec3d985fad2a135233a772164f9876fb58 (diff)
* lib/cgi.rb (CGI::QueryExtension::[]): no more transition
extend(CGI::Value). a patch from <tommy AT tmtm.org> in [ruby-dev:33583]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15371 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/cgi.rb25
1 files changed, 0 insertions, 25 deletions
diff --git a/lib/cgi.rb b/lib/cgi.rb
index 963b6b1fc3..52502b3114 100644
--- a/lib/cgi.rb
+++ b/lib/cgi.rb
@@ -1178,29 +1178,6 @@ class CGI
@multipart
end
- module Value # :nodoc:
- def set_params(params)
- @params = params
- end
- def [](idx, *args)
- if args.size == 0
- warn "#{caller(1)[0]}:CAUTION! cgi['key'] == cgi.params['key'][0]; if want Array, use cgi.params['key']"
- @params[idx]
- else
- super[idx,*args]
- end
- end
- def first
- warn "#{caller(1)[0]}:CAUTION! cgi['key'] == cgi.params['key'][0]; if want Array, use cgi.params['key']"
- self
- end
- alias last first
- def to_a
- @params || [self]
- end
- alias to_ary to_a # to be rhs of multiple assignment
- end
-
# Get the value for the parameter with a given key.
#
# If the parameter has multiple values, only the first will be
@@ -1219,8 +1196,6 @@ class CGI
end
else
str = if value then value.dup else "" end
- str.extend(Value)
- str.set_params(params)
str
end
end