summaryrefslogtreecommitdiff
path: root/test/optparse/test_summary.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/optparse/test_summary.rb')
-rw-r--r--test/optparse/test_summary.rb8
1 files changed, 8 insertions, 0 deletions
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