diff options
author | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-06-05 11:22:32 +0000 |
---|---|---|
committer | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-06-05 11:22:32 +0000 |
commit | 7493685b3b9d9dfc980e8639422bb64ff2530cd5 (patch) | |
tree | c028a576aeb16d137a85dfc62bddf48df6fd3add | |
parent | 7e9e152526d3e5e2ee187d532f5e0ba9f4e63aa3 (diff) |
* lib/rexml/document.rb (REXML::Document:write): leaky modification
trans -> transitive. [ruby-dev:32040], r13686
* lib/rexml/text.rb (Text.check): fix check for illigal characher.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16840 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | lib/rexml/document.rb | 4 | ||||
-rw-r--r-- | lib/rexml/text.rb | 2 |
3 files changed, 10 insertions, 3 deletions
@@ -1,3 +1,10 @@ +Thu Jun 5 20:17:29 2008 Yusuke Endoh <mame@tsg.ne.jp> + + * lib/rexml/document.rb (REXML::Document:write): leaky modification + trans -> transitive. [ruby-dev:32040], r13686 + + * lib/rexml/text.rb (Text.check): fix check for illigal characher. + Thu Jun 5 14:03:44 2008 Nobuyoshi Nakada <nobu@ruby-lang.org> * ext/iconv/iconv.c (iconv_create): find encoding without options. diff --git a/lib/rexml/document.rb b/lib/rexml/document.rb index 029c042295..42d70bb6da 100644 --- a/lib/rexml/document.rb +++ b/lib/rexml/document.rb @@ -168,7 +168,7 @@ module REXML # 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 3 more levels, or 6 more spaces (2 * 3). Defaults to -1 - # trans:: + # transitive:: # If transitive is true and indent is >= 0, then the output will be # pretty-printed in such a way that the added whitespace does not affect # the absolute *value* of the document -- that is, it leaves the value @@ -184,7 +184,7 @@ module REXML output = Output.new( output, xml_decl.encoding ) end formatter = if indent > -1 - if trans + if transitive REXML::Formatters::Transitive.new( indent, ie_hack ) else REXML::Formatters::Pretty.new( indent, ie_hack ) diff --git a/lib/rexml/text.rb b/lib/rexml/text.rb index 281b87890b..fac5ac3e41 100644 --- a/lib/rexml/text.rb +++ b/lib/rexml/text.rb @@ -150,7 +150,7 @@ module REXML end # context sensitive - string.scan(pattern).each do + string.scan(pattern) do if $1[-1] != ?; raise "Illegal character '#{$1}' in raw string \"#{string}\"" elsif $1[0] == ?& |