Also, the header comment is wrong. It says
  # indent::
  #   An integer.  If -1, no indenting will be used; otherwise, the
  #   indentation will be twice this number of spaces, ...
                         ^^^^^^^^^^^^
It should say:
  # indent::
  #   An integer.  If -1, no indenting will be used; otherwise, the
  #   indentation will be this number of spaces, ...
                         ^^^^^^

Eric Armstrong wrote:
I'm in NetBeans 6.1 beta, using the default JRuby
build, jruby-1.1RC1.

Just found this bug in document.rb

    def write( output=$stdout, indent=-1, trans=false, ie_hack=false )
                                         ^^^^^^^^^^^^^^
      if xml_decl.encoding != "UTF-8" && !output.kind_of?(Output)
        output = Output.new( output, xml_decl.encoding )
      end
      formatter = if indent > -1
        if transitive
          ^^^^^^^^^^^^
          ...

Since "transitive" is undefined, you get a runtime error if
you attempt to generate pretty-printed output by specifying
a value greater than -1.



--

Eric Armstrong, Document Systems Architect, Sun Microsystems
http://blogs.sun.com/coolstuff
http://www.artima.com/weblogs/index.jsp?blogger=cooltools

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email


Reply via email to