summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--lib/rexml/formatters/pretty.rb1
-rw-r--r--version.h2
3 files changed, 8 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index fb0bc41a4f..03423334a8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
diff --git a/version.h b/version.h
index 0af08682e4..a954aecc12 100644
--- a/version.h
+++ b/version.h
@@ -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