зеркало из https://github.com/github/ruby.git
* parse.y (arg_ambiguous): hopefully better message.
* lib/cgi.rb (CGI::QueryExtension::initialize_query): to_ary git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3711 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
808e9289e6
Коммит
f550e69efc
|
@ -1,3 +1,9 @@
|
|||
Tue Apr 22 09:20:40 2003 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* parse.y (arg_ambiguous): hopefully better message.
|
||||
|
||||
* lib/cgi.rb (CGI::QueryExtension::initialize_query): to_ary
|
||||
|
||||
Tue Apr 22 06:06:22 2003 Tanaka Akira <akr@m17n.org>
|
||||
|
||||
* lib/resolv.rb (Resolv::DNS::Resource#hash): use XOR to accumulate
|
||||
|
|
28
lib/cgi.rb
28
lib/cgi.rb
|
@ -941,27 +941,23 @@ convert string charset, and set language to "ja".
|
|||
end
|
||||
private :initialize_query
|
||||
|
||||
def [](key)
|
||||
value, = @params[key]
|
||||
unless value.nil?
|
||||
value = value.dup
|
||||
def value.to_ary
|
||||
[self]
|
||||
end
|
||||
def value.[](key)
|
||||
class Value < String
|
||||
def [](key)
|
||||
$stderr.puts <<END
|
||||
CAUTION! cgi['key'] == cgi.params['key'][0] If want Array, use cgi.params['key']
|
||||
END
|
||||
self
|
||||
end
|
||||
def value.first
|
||||
$stderr.puts <<END
|
||||
CAUTION! cgi['key'] == cgi.params['key'][0] If want Array, use cgi.params['key']
|
||||
END
|
||||
self
|
||||
end
|
||||
end
|
||||
value
|
||||
def first
|
||||
$stderr.puts <<END
|
||||
CAUTION! cgi['key'] == cgi.params['key'][0] If want Array, use cgi.params['key']
|
||||
END
|
||||
self
|
||||
end
|
||||
end
|
||||
|
||||
def [](key)
|
||||
Value.new(@params[key][0])
|
||||
end
|
||||
|
||||
def keys(*args)
|
||||
|
|
|
@ -67,7 +67,9 @@ class Rational < Numeric
|
|||
def Rational.new!(num, den = 1)
|
||||
new(num, den)
|
||||
end
|
||||
|
||||
|
||||
private_class_method :new
|
||||
|
||||
def initialize(num, den)
|
||||
if den < 0
|
||||
num = -num
|
||||
|
|
2
parse.y
2
parse.y
|
@ -3269,7 +3269,7 @@ here_document(here)
|
|||
static void
|
||||
arg_ambiguous()
|
||||
{
|
||||
rb_warning("ambiguous first argument; make sure");
|
||||
rb_warning("ambiguous first argument; put parentheses or even spaces");
|
||||
}
|
||||
|
||||
#define IS_ARG() (lex_state == EXPR_ARG || lex_state == EXPR_CMDARG)
|
||||
|
|
Загрузка…
Ссылка в новой задаче