ruby-changes:55977
From: Nobuyoshi <ko1@a...>
Date: Tue, 4 Jun 2019 00:34:27 +0900 (JST)
Subject: [ruby-changes:55977] Nobuyoshi Nakada: fc7b4c7018 (trunk): Simplify matching
https://git.ruby-lang.org/ruby.git/commit/?id=fc7b4c7018 From fc7b4c70185b320db3bb6f9a05261ec54ce8bc4c Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Tue, 4 Jun 2019 00:27:44 +0900 Subject: Simplify matching diff --git a/lib/reline/ansi.rb b/lib/reline/ansi.rb index 54ad3f2..fd0c52b 100644 --- a/lib/reline/ansi.rb +++ b/lib/reline/ansi.rb @@ -110,7 +110,7 @@ class Reline::ANSI https://github.com/ruby/ruby/blob/trunk/lib/reline/ansi.rb#L110 int_handle = Signal.trap('INT', 'IGNORE') otio = `stty -g`.chomp setting = ' -echo -icrnl cbreak' - if (`stty -a`.scan(/-parenb\b/).first == '-parenb') + if /-parenb\b/ =~ `stty -a` setting << ' pass8' end setting << ' -ixoff' -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/