diff options
Diffstat (limited to 'lib/rexml/text.rb')
-rw-r--r-- | lib/rexml/text.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/rexml/text.rb b/lib/rexml/text.rb index d09dc3ac54..f1e14e75fe 100644 --- a/lib/rexml/text.rb +++ b/lib/rexml/text.rb @@ -274,7 +274,7 @@ module REXML def indent_text(string, level=1, style="\t", indentfirstline=true) return string if level < 0 new_string = '' - string.each { |line| + string.each_line { |line| indent_string = style * level new_line = (indent_string + line).sub(/[\s]+$/,'') new_string << new_line |