ruby-changes:55958
From: Kazuhiro <ko1@a...>
Date: Sun, 2 Jun 2019 22:38:38 +0900 (JST)
Subject: [ruby-changes:55958] Kazuhiro NISHIYAMA: 4fda39fc87 (trunk): Use simpler regexp
https://git.ruby-lang.org/ruby.git/commit/?id=4fda39fc87 From 4fda39fc8788cbcdd07f04768ec84faf3ea44721 Mon Sep 17 00:00:00 2001 From: Kazuhiro NISHIYAMA <zn@m...> Date: Sun, 2 Jun 2019 22:37:42 +0900 Subject: Use simpler regexp diff --git a/test/reline/test_config.rb b/test/reline/test_config.rb index bb9bb30..d6f1ce5 100644 --- a/test/reline/test_config.rb +++ b/test/reline/test_config.rb @@ -21,7 +21,7 @@ class Reline::Config::Test < Reline::TestCase https://github.com/ruby/ruby/blob/trunk/test/reline/test_config.rb#L21 end def test_read_lines - @config.read_lines(<<~LINES.split(/(?<=\n)/)) + @config.read_lines(<<~LINES.split(/^/)) set bell-style on LINES @@ -71,7 +71,7 @@ class Reline::Config::Test < Reline::TestCase https://github.com/ruby/ruby/blob/trunk/test/reline/test_config.rb#L71 set bell-style on PARTIAL_LINES end - @config.read_lines(<<~LINES.split(/(?<=\n)/)) + @config.read_lines(<<~LINES.split(/^/)) $include included_partial LINES @@ -79,7 +79,7 @@ class Reline::Config::Test < Reline::TestCase https://github.com/ruby/ruby/blob/trunk/test/reline/test_config.rb#L79 end def test_if - @config.read_lines(<<~LINES.split(/(?<=\n)/)) + @config.read_lines(<<~LINES.split(/^/)) $if Ruby set bell-style audible $else @@ -91,7 +91,7 @@ class Reline::Config::Test < Reline::TestCase https://github.com/ruby/ruby/blob/trunk/test/reline/test_config.rb#L91 end def test_if_with_false - @config.read_lines(<<~LINES.split(/(?<=\n)/)) + @config.read_lines(<<~LINES.split(/^/)) $if Python set bell-style audible $else @@ -104,7 +104,7 @@ class Reline::Config::Test < Reline::TestCase https://github.com/ruby/ruby/blob/trunk/test/reline/test_config.rb#L104 def test_if_with_indent %w[Ruby Reline].each do |cond| - @config.read_lines(<<~LINES.split(/(?<=\n)/)) + @config.read_lines(<<~LINES.split(/^/)) set bell-style none $if #{cond} set bell-style audible @@ -119,7 +119,7 @@ class Reline::Config::Test < Reline::TestCase https://github.com/ruby/ruby/blob/trunk/test/reline/test_config.rb#L119 def test_default_key_bindings @config.add_default_key_binding('abcd'.bytes, 'EFGH'.bytes) - @config.read_lines(<<~'LINES'.split(/(?<=\n)/)) + @config.read_lines(<<~'LINES'.split(/^/)) "abcd": "ABCD" "ijkl": "IJKL" LINES -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/