diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-04-16 13:56:19 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-04-16 13:56:19 +0000 |
commit | 047f685d738cec6a1573f600da1e84d10975e61a (patch) | |
tree | c809c96da1a889e109628dc46ca55454be08a778 /ext/pty | |
parent | a8c748d2773b6ce5d871360ee36f7d214ae1af11 (diff) |
* ext/pty/expect_sample.rb: avoid symbolic link representation for
expect. a patch from Kazuhiro NISHIYAMA <zn at mbf.nifty.com>.
[ruby-dev:30714]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12185 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/pty')
-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 |