diff options
Diffstat (limited to 'ext')
-rw-r--r-- | ext/pty/expect_sample.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/pty/expect_sample.rb b/ext/pty/expect_sample.rb index bf8a2352fe..10c50ead7a 100644 --- a/ext/pty/expect_sample.rb +++ b/ext/pty/expect_sample.rb @@ -37,9 +37,9 @@ PTY.spawn("ftp ftp.ruby-lang.org") do |r_f,w_f,pid| w_f.print "dir\n" end - r_f.expect("> ") do |output| + r_f.expect(/[^\-]> /) do |output| for x in output[0].split("\n") - if x =~ /(ruby.*\.tar\.gz)/ then + if x =~ /(ruby.*?\.tar\.gz)/ then fnames.push $1 end end |