diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | lib/rexml/formatters/pretty.rb | 1 | ||||
-rw-r--r-- | version.h | 2 |
3 files changed, 8 insertions, 1 deletions
@@ -1,3 +1,9 @@ +Sun Jan 25 00:07:23 2009 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 + Sun Jan 25 00:02:23 2009 Yuki Sonoda (Yugui) <yugui@yugui.jp> * 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 d21175d34a..dd03626a21 100644 --- a/lib/rexml/formatters/pretty.rb +++ b/lib/rexml/formatters/pretty.rb @@ -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 @@ -2,7 +2,7 @@ #define RUBY_RELEASE_DATE "2009-01-25" #define RUBY_VERSION_CODE 187 #define RUBY_RELEASE_CODE 20090125 -#define RUBY_PATCHLEVEL 94 +#define RUBY_PATCHLEVEL 95 #define RUBY_VERSION_MAJOR 1 #define RUBY_VERSION_MINOR 8 |