ruby-changes:10215
From: shyouhei <ko1@a...>
Date: Sun, 25 Jan 2009 00:07:43 +0900 (JST)
Subject: [ruby-changes:10215] Ruby:r21759 (ruby_1_8_7): merge revision(s) 19511:
shyouhei 2009-01-25 00:07:30 +0900 (Sun, 25 Jan 2009) New Revision: 21759 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=21759 Log: 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 Modified files: branches/ruby_1_8_7/ChangeLog branches/ruby_1_8_7/lib/rexml/formatters/pretty.rb branches/ruby_1_8_7/version.h Index: ruby_1_8_7/ChangeLog =================================================================== --- ruby_1_8_7/ChangeLog (revision 21758) +++ ruby_1_8_7/ChangeLog (revision 21759) @@ -1,3 +1,9 @@ +Sun Jan 25 00:07:23 2009 Yukihiro Matsumoto <matz@r...> + + * 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@y...> * lib/matrix.rb (Vector#eql?): typo of the method name as "eqn?". Index: ruby_1_8_7/version.h =================================================================== --- ruby_1_8_7/version.h (revision 21758) +++ ruby_1_8_7/version.h (revision 21759) @@ -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 Index: ruby_1_8_7/lib/rexml/formatters/pretty.rb =================================================================== --- ruby_1_8_7/lib/rexml/formatters/pretty.rb (revision 21758) +++ ruby_1_8_7/lib/rexml/formatters/pretty.rb (revision 21759) @@ -128,6 +128,7 @@ # 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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/