8000 * lib/rexml/formatters/pretty.rb (REXML::Formatters::Pretty#wrap): · documenting-ruby/ruby@83abcf5 · GitHub
[go: up one dir, main page]

Skip to content

Commit 83abcf5

Browse files
author
matz
committed
* lib/rexml/formatters/pretty.rb (REXML::Formatters::Pretty#wrap):
abandon wrapping if the line contains no space. [ruby-dev:36045] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19487 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
1 parent 6b90013 commit 83abcf5

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

ChangeLog

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
Tue Sep 23 20:06:46 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
2+
3+
* lib/rexml/formatters/pretty.rb (REXML::Formatters::Pretty#wrap):
4+
abandon wrapping if the line contains no space. [ruby-dev:36045]
5+
16
Tue Sep 23 19:38:03 2008 NAKAMURA Usaku <usa@ruby-lang.org>
27

38
* win32/win32.c (subtruct): check tv_sec. reported by ko1.

lib/rexml/formatters/pretty.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ def wrap(string, width)
129129
# Recursively wrap string at width.
130130
return string if string.length <= width
131131
place = string.rindex(' ', width) # Position in string with last ' ' before cutoff
132+
return string if place.nil?
132133
return string[0,place] + "\n" + wrap(string[place+1..-1], width)
133134
end
134135

0 commit comments

Comments
 (0)
0