summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--test/optparse/test_summary.rb8
2 files changed, 13 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 6c37e30feb1..6e7c4be1361 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Thu Apr 26 01:32:33 2012 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
+
+ * test/optparse/test_summary.rb (test_summary_containing_space): add
+ test for r35467. OptionParser#to_a shouldn't split banner by spaces.
+
Wed Apr 25 23:02:46 2012 Tanaka Akira <akr@fsij.org>
* ext/socket/raddrinfo.c (init_unix_addrinfo): refine error message
diff --git a/test/optparse/test_summary.rb b/test/optparse/test_summary.rb
index d7771733a3f..54fd194bbd7 100644
--- a/test/optparse/test_summary.rb
+++ b/test/optparse/test_summary.rb
@@ -35,4 +35,12 @@ class TestOptionParser::SummaryTest < TestOptionParser
assert_equal("foo\nbar\n", o.to_s)
assert_equal(["foo\n", "bar"], o.to_a)
end
+
+ def test_summary_containing_space
+ # test for r35467. OptionParser#to_a shouldn't split str by spaces.
+ bug6348 = '[ruby-dev:45568]'
+ o = OptionParser.new("foo bar")
+ assert_equal("foo bar\n", o.to_s, bug6348)
+ assert_equal(["foo bar"], o.to_a, bug6348)
+ end
end