Project

General

Profile

Bug #553

REXML::Document#write(io, 1, true, true) #=> NameError/ArgumentError

Added by akira (akira yamada) almost 10 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Normal
[ruby-dev:36230]

Description

=begin
以下でNameErrorになります。

require "rexml/document"
=> true
REXML::Document.new("").write($stdout, 1, true, true)
NameError: uninitialized constant REXML::Formatters::Transitive
from /home/akira/src/ruby/ruby/lib/rexml/document.rb:189:in write'
from (irb):2
from bin/irb:12:in
'

明示的にrexml/formatters/transitiveをrequireしてもArgumentErrorになります。

require "rexml/document"
=> true
require "rexml/formatters/transitive"
=> true
REXML::Document.new("").write($stdout, 1, true, true)
ArgumentError: wrong number of arguments (2 for 1)
from /home/akira/src/ruby/ruby/lib/rexml/document.rb:189:in new'
from /home/akira/src/ruby/ruby/lib/rexml/document.rb:189:in
write'
from (irb):4
from bin/irb:12:in `'

ruby_1_8も同じです。

添付したパッチで回避できます。
=end

p (1.79 KB) p akira (akira yamada), 09/09/2008 10:01 PM

Associated revisions

Revision bc53f80b
Added by matz (Yukihiro Matsumoto) over 9 years ago

  • lib/rexml/document.rb (REXML::Document#write): require
    rexml/formatters/transitive if transitive flag is on. a patch
    from akira yamada in . fix #553

  • lib/rexml/element.rb (REXML::Element#write): ditto.

  • lib/rexml/formatters/transitive.rb (REXML::Formatters::Transitive#write_element):
    add hack for IE.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20620 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 20620
Added by matz (Yukihiro Matsumoto) over 9 years ago

  • lib/rexml/document.rb (REXML::Document#write): require
    rexml/formatters/transitive if transitive flag is on. a patch
    from akira yamada in . fix #553

  • lib/rexml/element.rb (REXML::Element#write): ditto.

  • lib/rexml/formatters/transitive.rb (REXML::Formatters::Transitive#write_element):
    add hack for IE.

Revision 20620
Added by matz (Yukihiro Matsumoto) over 9 years ago

  • lib/rexml/document.rb (REXML::Document#write): require
    rexml/formatters/transitive if transitive flag is on. a patch
    from akira yamada in . fix #553

  • lib/rexml/element.rb (REXML::Element#write): ditto.

  • lib/rexml/formatters/transitive.rb (REXML::Formatters::Transitive#write_element):
    add hack for IE.

Revision 20620
Added by matz (Yukihiro Matsumoto) over 9 years ago

  • lib/rexml/document.rb (REXML::Document#write): require
    rexml/formatters/transitive if transitive flag is on. a patch
    from akira yamada in . fix #553

  • lib/rexml/element.rb (REXML::Element#write): ditto.

  • lib/rexml/formatters/transitive.rb (REXML::Formatters::Transitive#write_element):
    add hack for IE.

Revision 20620
Added by matz (Yukihiro Matsumoto) over 9 years ago

  • lib/rexml/document.rb (REXML::Document#write): require
    rexml/formatters/transitive if transitive flag is on. a patch
    from akira yamada in . fix #553

  • lib/rexml/element.rb (REXML::Element#write): ditto.

  • lib/rexml/formatters/transitive.rb (REXML::Formatters::Transitive#write_element):
    add hack for IE.

Revision 20620
Added by matz (Yukihiro Matsumoto) over 9 years ago

  • lib/rexml/document.rb (REXML::Document#write): require
    rexml/formatters/transitive if transitive flag is on. a patch
    from akira yamada in . fix #553

  • lib/rexml/element.rb (REXML::Element#write): ditto.

  • lib/rexml/formatters/transitive.rb (REXML::Formatters::Transitive#write_element):
    add hack for IE.

Revision a9b7eed7
Added by yugui (Yuki Sonoda) over 9 years ago

merges r20620 from trunk into ruby_1_9_1.

  • lib/rexml/document.rb (REXML::Document#write): require
    rexml/formatters/transitive if transitive flag is on. a patch
    from akira yamada in . fix #553

  • lib/rexml/element.rb (REXML::Element#write): ditto.

  • lib/rexml/formatters/transitive.rb (REXML::Formatters::Transitive#write_element):
    add hack for IE.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@20695 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

History

#1 Updated by ko1 (Koichi Sasada) over 9 years ago

  • Assignee set to ser (Sean Russell)

=begin

=end

#2 Updated by yugui (Yuki Sonoda) over 9 years ago

  • Target version set to 1.9.1 Release Candidate

=begin

=end

#3 Updated by matz (Yukihiro Matsumoto) over 9 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

=begin
Applied in changeset r20620.
=end

Also available in: Atom PDF