diff options
-rw-r--r-- | lib/optparse.rb | 2 | ||||
-rw-r--r-- | test/optparse/test_summary.rb | 6 | ||||
-rw-r--r-- | version.h | 2 |
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 @@ -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 |