diff options
author | nagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-03-05 15:58:01 +0000 |
---|---|---|
committer | nagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-03-05 15:58:01 +0000 |
commit | 297478cd0043a083947683bec2278402246ae983 (patch) | |
tree | bc870b000aa5e246fcad6cc72957ac49eb2c5419 | |
parent | 93c833187c6e47c18b1cfafd5e1b9f682a43d482 (diff) |
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]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@62666 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ruby.c | 2 | ||||
-rw-r--r-- | test/ruby/test_rubyoptions.rb | 2 | ||||
-rw-r--r-- | version.h | 2 |
3 files changed, 4 insertions, 2 deletions
@@ -1149,7 +1149,7 @@ proc_options(long argc, char **argv, ruby_cmdline_options_t *opt, int envopt) 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; diff --git a/test/ruby/test_rubyoptions.rb b/test/ruby/test_rubyoptions.rb index 5296768be8..fb637dd5be 100644 --- a/test/ruby/test_rubyoptions.rb +++ b/test/ruby/test_rubyoptions.rb @@ -184,6 +184,8 @@ class TestRubyOptions < Test::Unit::TestCase 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 @@ -1,6 +1,6 @@ #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 |