diff options
Diffstat (limited to 'ext/pty/lib/expect.rb')
-rw-r--r-- | ext/pty/lib/expect.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/pty/lib/expect.rb b/ext/pty/lib/expect.rb index 5b5619e6b2..aa9ab895d3 100644 --- a/ext/pty/lib/expect.rb +++ b/ext/pty/lib/expect.rb @@ -20,8 +20,8 @@ class IO STDOUT.print c STDOUT.flush end - if buf =~ e_pat then - result = [buf,$1,$2,$3,$4,$5,$6,$7,$8,$9] + if mat=e_pat.match(buf) then + result = [buf,*mat.to_a[1..-1]] break end end |