summaryrefslogtreecommitdiffstats
path: root/ext/pty
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-04-16 13:56:19 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-04-16 13:56:19 +0000
commit33d48e306d5300d51022a1cb5b0a8c17f2979580 (patch)
treec809c96da1a889e109628dc46ca55454be08a778 /ext/pty
parent235e37bc5924a91cf3420470840097ebd78c89ac (diff)
downloadruby-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.rb4
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