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 | 33d48e306d5300d51022a1cb5b0a8c17f2979580 (patch) | |
tree | c809c96da1a889e109628dc46ca55454be08a778 /ext/pty | |
parent | 235e37bc5924a91cf3420470840097ebd78c89ac (diff) | |
download | ruby-33d48e306d5300d51022a1cb5b0a8c17f2979580.tar.gz ruby-33d48e306d5300d51022a1cb5b0a8c17f2979580.tar.xz ruby-33d48e306d5300d51022a1cb5b0a8c17f2979580.zip |
* 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: http://svn.ruby-lang.org/repos/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 bf8a2352f..10c50ead7 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 |