summaryrefslogtreecommitdiff
path: root/ext/pty
diff options
context:
space:
mode:
authorknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-10-21 05:18:40 (GMT)
committerknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-10-21 05:18:40 (GMT)
commitd83f9745f5f4e3ed8cc0ce2b47c6dfbef498e42f (patch)
tree0c9a9d903be6d54d30c0d335732ef578a8f848f7 /ext/pty
parentda665b0234c7d6eb935f8ccd4ced84bcbf197dcf (diff)
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.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/pty/lib/expect.rb b/ext/pty/lib/expect.rb
index 1729482..5dbfa09 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