From d83f9745f5f4e3ed8cc0ce2b47c6dfbef498e42f Mon Sep 17 00:00:00 2001 From: knu Date: Sat, 21 Oct 2017 05:18:40 +0000 Subject: Replace `to_a[1..-1]` on a MatchData with `captures` git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60228 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/pty/lib/expect.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/pty') diff --git a/ext/pty/lib/expect.rb b/ext/pty/lib/expect.rb index 1729482e04..5dbfa09ae9 100644 --- a/ext/pty/lib/expect.rb +++ b/ext/pty/lib/expect.rb @@ -57,7 +57,7 @@ class IO STDOUT.flush end if mat=e_pat.match(buf) then - result = [buf,*mat.to_a[1..-1]] + result = [buf,*mat.captures] break end end -- cgit v1.2.3