summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-04-24 06:52:23 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-04-24 06:52:23 +0000
commit5d466e51fe8091c3a85899ac85fa68ad17048785 (patch)
treebd275bbf91fd0264777b28c69756924b1f47aabb
parent87b770c8e3a257b6255e1f3dc0c488ed88863c53 (diff)
merge revision(s) 35455:
* lib/optparse.rb (OptionParser#to_a): should split by end-of-line [ruby-dev:45568][Bug #6348] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@35456 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--lib/optparse.rb2
-rw-r--r--test/optparse/test_summary.rb6
-rw-r--r--version.h2
3 files changed, 5 insertions, 5 deletions
diff --git a/lib/optparse.rb b/lib/optparse.rb
index 75c6b76bc6..2306606b87 100644
--- a/lib/optparse.rb
+++ b/lib/optparse.rb
@@ -1071,7 +1071,7 @@ XXX
#
# Returns option summary list.
#
- def to_a; summarize([*banner]) end
+ def to_a; summarize("#{banner}".split(/$/)) end
#
# Checks if an argument is given twice, in which case an ArgumentError is
diff --git a/test/optparse/test_summary.rb b/test/optparse/test_summary.rb
index bda3b49890..2fad5f04dc 100644
--- a/test/optparse/test_summary.rb
+++ b/test/optparse/test_summary.rb
@@ -31,8 +31,8 @@ class TestOptionParser::SummaryTest < TestOptionParser
end
def test_summary
- o = OptionParser.new("foo bar")
- assert_equal("foo bar\n", o.to_s)
- assert_equal(["foo bar"], o.to_a)
+ o = OptionParser.new("foo\nbar")
+ assert_equal("foo\nbar\n", o.to_s)
+ assert_equal(["foo", "bar"], o.to_a)
end
end
diff --git a/version.h b/version.h
index d21803b553..78ce222e82 100644
--- a/version.h
+++ b/version.h
@@ -1,5 +1,5 @@
#define RUBY_VERSION "1.9.3"
-#define RUBY_PATCHLEVEL 197
+#define RUBY_PATCHLEVEL 198
#define RUBY_RELEASE_DATE "2012-04-24"
#define RUBY_RELEASE_YEAR 2012