* lib/cgi.rb (nOE_element_def): fix error when cascade methods which
don't have arguments. Patch by Takeyuki Fujioka. [ruby-dev:35964] * lib/cgi.rb (blockquote): String#collect (this depends on String#each) is no longer exists. Patch by Takeyuki Fujioka. [ruby-dev:35946] * lib/cgi.rb (blockquote): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18860 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
3c66a5b25e
commit
ae86df99f7
11
ChangeLog
11
ChangeLog
@ -1,3 +1,14 @@
|
|||||||
|
Tue Aug 26 11:33:30 2008 NARUSE, Yui <naruse@ruby-lang.org>
|
||||||
|
|
||||||
|
* lib/cgi.rb (nOE_element_def): fix error when cascade methods which
|
||||||
|
don't have arguments. Patch by Takeyuki Fujioka. [ruby-dev:35964]
|
||||||
|
|
||||||
|
* lib/cgi.rb (blockquote): String#collect (this depends on
|
||||||
|
String#each) is no longer exists.
|
||||||
|
Patch by Takeyuki Fujioka. [ruby-dev:35946]
|
||||||
|
|
||||||
|
* lib/cgi.rb (blockquote): ditto.
|
||||||
|
|
||||||
Tue Aug 26 03:06:48 2008 Tanaka Akira <akr@fsij.org>
|
Tue Aug 26 03:06:48 2008 Tanaka Akira <akr@fsij.org>
|
||||||
|
|
||||||
* io.c (make_writeconv): copy invalid/undef flags.
|
* io.c (make_writeconv): copy invalid/undef flags.
|
||||||
|
@ -1283,6 +1283,7 @@ class CGI
|
|||||||
# - O EMPTY
|
# - O EMPTY
|
||||||
def nOE_element_def(element, append = nil)
|
def nOE_element_def(element, append = nil)
|
||||||
s = <<-END
|
s = <<-END
|
||||||
|
attributes={attributes=>nil} if attributes.kind_of?(String)
|
||||||
"<#{element.upcase}" + attributes.collect{|name, value|
|
"<#{element.upcase}" + attributes.collect{|name, value|
|
||||||
next unless value
|
next unless value
|
||||||
" " + CGI::escapeHTML(name) +
|
" " + CGI::escapeHTML(name) +
|
||||||
@ -1389,11 +1390,11 @@ class CGI
|
|||||||
#
|
#
|
||||||
# blockquote("http://www.example.com/quotes/foo.html") { "Foo!" }
|
# blockquote("http://www.example.com/quotes/foo.html") { "Foo!" }
|
||||||
# #=> "<BLOCKQUOTE CITE=\"http://www.example.com/quotes/foo.html\">Foo!</BLOCKQUOTE>
|
# #=> "<BLOCKQUOTE CITE=\"http://www.example.com/quotes/foo.html\">Foo!</BLOCKQUOTE>
|
||||||
def blockquote(cite = nil) # :yield:
|
def blockquote(cite = {}) # :yield:
|
||||||
attributes = if cite.kind_of?(String)
|
attributes = if cite.kind_of?(String)
|
||||||
{ "CITE" => cite }
|
{ "CITE" => cite }
|
||||||
else
|
else
|
||||||
cite or ""
|
cite
|
||||||
end
|
end
|
||||||
if block_given?
|
if block_given?
|
||||||
super(attributes){ yield }
|
super(attributes){ yield }
|
||||||
@ -1413,11 +1414,11 @@ class CGI
|
|||||||
#
|
#
|
||||||
# caption("left") { "Capital Cities" }
|
# caption("left") { "Capital Cities" }
|
||||||
# # => <CAPTION ALIGN=\"left\">Capital Cities</CAPTION>
|
# # => <CAPTION ALIGN=\"left\">Capital Cities</CAPTION>
|
||||||
def caption(align = nil) # :yield:
|
def caption(align = {}) # :yield:
|
||||||
attributes = if align.kind_of?(String)
|
attributes = if align.kind_of?(String)
|
||||||
{ "ALIGN" => align }
|
{ "ALIGN" => align }
|
||||||
else
|
else
|
||||||
align or ""
|
align
|
||||||
end
|
end
|
||||||
if block_given?
|
if block_given?
|
||||||
super(attributes){ yield }
|
super(attributes){ yield }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user