Project

General

Profile

Actions

Bug #489

closed

cgi.rbのCGI#blockquoteとCGI#captionがエラー

Added by xibbar (Takeyuki FUJIOKA) over 15 years ago. Updated about 13 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
Backport:
[ruby-dev:35946]

Description

=begin
String#collectが使えなくなった影響で
2つのタグ生成メソッドがエラーになります。
html3、html4、html4trで全てチェックしましたが、
以上の2つだけでした。
Index: lib/cgi.rb

--- lib/cgi.rb (revision 18827)
+++ lib/cgi.rb (working copy)
@@ -1389,11 +1389,11 @@
#
# blockquote("http://www.example.com/quotes/foo.html") { "Foo!" }
# #=> "<BLOCKQUOTE CITE="http://www.example.com/quotes/foo.html\">Foo!

  • def blockquote(cite = nil) # :yield:
  • def blockquote(cite = {}) # :yield:
    attributes = if cite.kind_of?(String)
    { "CITE" => cite }
    else
  •                 cite or ""
    
  •                 cite
                  end
     if block_given?
       super(attributes){ yield }
    

@@ -1413,11 +1413,11 @@
#
# caption("left") { "Capital Cities" }
# # => <CAPTION ALIGN="left">Capital Cities

  • def caption(align = nil) # :yield:
  • def caption(align = {}) # :yield:
    attributes = if align.kind_of?(String)
    { "ALIGN" => align }
    else
  •                 align or ""
    
  •                 align
                  end
     if block_given?
       super(attributes){ yield }
    

=end


Files

test_cgi_tag_helper.diff (11.8 KB) test_cgi_tag_helper.diff xibbar (Takeyuki FUJIOKA), 08/26/2008 12:04 AM
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0