ruby-changes:50528
From: nagachika <ko1@a...>
Date: Tue, 6 Mar 2018 00:58:05 +0900 (JST)
Subject: [ruby-changes:50528] nagachika:r62666 (ruby_2_4): merge revision(s) 59970: [Backport #13736]
nagachika 2018-03-06 00:58:01 +0900 (Tue, 06 Mar 2018) New Revision: 62666 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=62666 Log: merge revision(s) 59970: [Backport #13736] ruby.c: paragraph mode by -00 * ruby.c (proc_options): set to paragraph mode, if -00 is given, as well as perl and -R0 option in 0.49. [ruby-core:81987] [Bug #13736] Modified directories: branches/ruby_2_4/ Modified files: branches/ruby_2_4/ruby.c branches/ruby_2_4/test/ruby/test_rubyoptions.rb branches/ruby_2_4/version.h Index: ruby_2_4/ruby.c =================================================================== --- ruby_2_4/ruby.c (revision 62665) +++ ruby_2_4/ruby.c (revision 62666) @@ -1149,7 +1149,7 @@ proc_options(long argc, char **argv, rub https://github.com/ruby/ruby/blob/trunk/ruby_2_4/ruby.c#L1149 if (v > 0377) rb_rs = Qnil; else if (v == 0 && numlen >= 2) { - rb_rs = rb_str_new2("\n\n"); + rb_rs = rb_str_new2(""); } else { c = v & 0xff; Index: ruby_2_4/test/ruby/test_rubyoptions.rb =================================================================== --- ruby_2_4/test/ruby/test_rubyoptions.rb (revision 62665) +++ ruby_2_4/test/ruby/test_rubyoptions.rb (revision 62666) @@ -184,6 +184,8 @@ class TestRubyOptions < Test::Unit::Test https://github.com/ruby/ruby/blob/trunk/ruby_2_4/test/ruby/test_rubyoptions.rb#L184 assert_in_out_err(%w(-0141 -e) + ["print gets"], "foo\nbar\0baz", %w(foo ba), []) assert_in_out_err(%w(-0e) + ["print gets"], "foo\nbar\0baz", %W(foo bar\0), []) + + assert_in_out_err(%w(-00 -e) + ["p gets, gets"], "foo\nbar\n\n\n\nbaz\n", %w("foo\nbar\n\n" "baz\n"), []) end def test_autosplit Index: ruby_2_4/version.h =================================================================== --- ruby_2_4/version.h (revision 62665) +++ ruby_2_4/version.h (revision 62666) @@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_4/version.h#L1 #define RUBY_VERSION "2.4.4" #define RUBY_RELEASE_DATE "2018-03-06" -#define RUBY_PATCHLEVEL 250 +#define RUBY_PATCHLEVEL 251 #define RUBY_RELEASE_YEAR 2018 #define RUBY_RELEASE_MONTH 3 Index: ruby_2_4 =================================================================== --- ruby_2_4 (revision 62665) +++ ruby_2_4 (revision 62666) Property changes on: ruby_2_4 ___________________________________________________________________ Modified: svn:mergeinfo ## -0,0 +0,1 ## Merged /trunk:r59970 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/