From e903ebb335f762db6a0015a7375fb9760bde38db Mon Sep 17 00:00:00 2001 From: shyouhei Date: Sat, 24 Jan 2009 15:06:59 +0000 Subject: merge revision(s) 19511: * 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_6@21757 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 6 ++++++ lib/rexml/formatters/pretty.rb | 1 + version.h | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index b143d7e175..9ca843c3e3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Sun Jan 25 00:06:48 2009 Yukihiro Matsumoto + + * lib/rexml/formatters/pretty.rb (REXML::Formatters::Pretty#wrap): + abandon wrapping if the line contains no space. [ruby-dev:36045] + fix: #342 + Sun Jan 25 00:00:50 2009 Yuki Sonoda (Yugui) * lib/matrix.rb (Vector#eql?): typo of the method name as "eqn?". diff --git a/lib/rexml/formatters/pretty.rb b/lib/rexml/formatters/pretty.rb index 22b6d857cd..9766ea6348 100644 --- a/lib/rexml/formatters/pretty.rb +++ b/lib/rexml/formatters/pretty.rb @@ -128,6 +128,7 @@ module REXML # Recursivly 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 diff --git a/version.h b/version.h index ffad6fd071..1e0cb825ec 100644 --- a/version.h +++ b/version.h @@ -2,7 +2,7 @@ #define RUBY_RELEASE_DATE "2009-01-25" #define RUBY_VERSION_CODE 186 #define RUBY_RELEASE_CODE 20090125 -#define RUBY_PATCHLEVEL 308 +#define RUBY_PATCHLEVEL 309 #define RUBY_VERSION_MAJOR 1 #define RUBY_VERSION_MINOR 8 -- cgit v1.2.3