mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/rexml/text.rb: String no longer has #each.
Patch by Mitsutaka Mimura (takkanm). [ruby-dev:39949]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26234 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
2a26264064
commit
0e8fae89ab
2 changed files with 6 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue