diff options
author | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-10-21 05:18:40 +0000 |
---|---|---|
committer | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-10-21 05:18:40 +0000 |
commit | 017d61bdd2c7a1c7b6348748b6d1ad0696842c26 (patch) | |
tree | 0c9a9d903be6d54d30c0d335732ef578a8f848f7 /ext/pty/lib | |
parent | 6bfa9b47866b92a7da20a37b3533e9bb1c85c6aa (diff) | |
download | ruby-017d61bdd2c7a1c7b6348748b6d1ad0696842c26.tar.gz |
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
Diffstat (limited to 'ext/pty/lib')
-rw-r--r-- | ext/pty/lib/expect.rb | 2 |
1 files changed, 1 insertions, 1 deletions
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 |