ruby-changes:10214
From: shyouhei <ko1@a...>
Date: Sun, 25 Jan 2009 00:07:12 +0900 (JST)
Subject: [ruby-changes:10214] Ruby:r21757 (ruby_1_8_6): merge revision(s) 19511:
shyouhei 2009-01-25 00:06:59 +0900 (Sun, 25 Jan 2009) New Revision: 21757 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=21757 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_6/ChangeLog branches/ruby_1_8_6/lib/rexml/formatters/pretty.rb branches/ruby_1_8_6/version.h Index: ruby_1_8_6/ChangeLog =================================================================== --- ruby_1_8_6/ChangeLog (revision 21756) +++ ruby_1_8_6/ChangeLog (revision 21757) @@ -1,3 +1,9 @@ +Sun Jan 25 00:06:48 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:00:50 2009 Yuki Sonoda (Yugui) <yugui@y...> * lib/matrix.rb (Vector#eql?): typo of the method name as "eqn?". Index: ruby_1_8_6/version.h =================================================================== --- ruby_1_8_6/version.h (revision 21756) +++ ruby_1_8_6/version.h (revision 21757) @@ -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 Index: ruby_1_8_6/lib/rexml/formatters/pretty.rb =================================================================== --- ruby_1_8_6/lib/rexml/formatters/pretty.rb (revision 21756) +++ ruby_1_8_6/lib/rexml/formatters/pretty.rb (revision 21757) @@ -128,6 +128,7 @@ # 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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/