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 | d83f9745f5f4e3ed8cc0ce2b47c6dfbef498e42f (patch) | |
tree | 0c9a9d903be6d54d30c0d335732ef578a8f848f7 /ext/pty | |
parent | da665b0234c7d6eb935f8ccd4ced84bcbf197dcf (diff) | |
download | ruby-d83f9745f5f4e3ed8cc0ce2b47c6dfbef498e42f.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')
-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 |