diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-03-06 03:56:38 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-03-06 03:56:38 +0000 |
commit | 287a34ae0dfc23e4158f67cb7783d239f202c368 (patch) | |
tree | 5e35d5b41aae961b37cf6632f60c42f51c7aa775 /lib/rexml/document.rb | |
parent | 9b52ae2e6491bb5d6c59e1799449f6268baf6f89 (diff) | |
download | ruby-287a34ae0dfc23e4158f67cb7783d239f202c368.tar.gz |
* {ext,lib,test}/**/*.rb: removed trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rexml/document.rb')
-rw-r--r-- | lib/rexml/document.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/rexml/document.rb b/lib/rexml/document.rb index 48f1a0ec6c..0fde6df1a1 100644 --- a/lib/rexml/document.rb +++ b/lib/rexml/document.rb @@ -25,7 +25,7 @@ module REXML DECLARATION = XMLDecl.default # Constructor - # @param source if supplied, must be a Document, String, or IO. + # @param source if supplied, must be a Document, String, or IO. # Documents have their context and Element attributes cloned. # Strings are expected to be valid XML documents. IOs are expected # to be sources of valid XML documents. @@ -69,11 +69,11 @@ module REXML @children.unshift child child.parent = self elsif child.kind_of? DocType - # Find first Element or DocType node and insert the decl right + # Find first Element or DocType node and insert the decl right # before it. If there is no such node, just insert the child at the # end. If there is a child and it is an DocType, then replace it. insert_before_index = 0 - @children.find { |x| + @children.find { |x| insert_before_index += 1 x.kind_of?(Element) || x.kind_of?(DocType) } @@ -167,7 +167,7 @@ module REXML # indent:: # An integer. If -1, no indenting will be used; otherwise, the # indentation will be twice this number of spaces, and children will be - # indented an additional amount. For a value of 3, every item will be + # indented an additional amount. For a value of 3, every item will be # indented 3 more levels, or 6 more spaces (2 * 3). Defaults to -1 # transitive:: # If transitive is true and indent is >= 0, then the output will be @@ -178,7 +178,7 @@ module REXML # Internet Explorer is the worst piece of crap to have ever been # written, with the possible exception of Windows itself. Since IE is # unable to parse proper XML, we have to provide a hack to generate XML - # that IE's limited abilities can handle. This hack inserts a space + # that IE's limited abilities can handle. This hack inserts a space # before the /> on empty tags. Defaults to false def write( output=$stdout, indent=-1, transitive=false, ie_hack=false ) if xml_decl.encoding != "UTF-8" && !output.kind_of?(Output) @@ -197,7 +197,7 @@ module REXML formatter.write( self, output ) end - + def Document::parse_stream( source, listener ) Parsers::StreamParser.new( source, listener ).parse end @@ -215,7 +215,7 @@ module REXML end attr_reader :entity_expansion_count - + def record_entity_expansion @entity_expansion_count += 1 if @entity_expansion_count > @@entity_expansion_limit |