mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/rexml/formatters/pretty.rb (REXML::Formatters::Pretty#wrap):
abandon wrapping if the line contains no space. [ruby-dev:36045] fix: #342 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@19511 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
3bd735314d
commit
9e0e9ab395
2 changed files with 7 additions and 0 deletions
|
@ -1,3 +1,9 @@
|
|||
Wed Sep 24 14:11:59 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* lib/rexml/formatters/pretty.rb (REXML::Formatters::Pretty#wrap):
|
||||
abandon wrapping if the line contains no space. [ruby-dev:36045]
|
||||
fix: #342
|
||||
|
||||
Tue Sep 23 19:50:24 2008 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||
|
||||
* win32/win32.c (subtruct): check tv_sec.
|
||||
|
|
|
@ -128,6 +128,7 @@ module REXML
|
|||
# Recursively wrap string at width.
|
||||
return string if string.length <= width
|
||||
place = string.rindex(' ', width) # Position in string with last ' ' before cutoff
|
||||
return string if place.nil?
|
||||
return string[0,place] + "\n" + wrap(string[place+1..-1], width)
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue