summaryrefslogtreecommitdiff
path: root/ext/pty
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-04-16 13:57:13 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-04-16 13:57:13 +0000
commit0ce51bc995521f1c0c60d6b2409646ea7cde5ce7 (patch)
treed16067dbd92796988f0c6d37f89bcdccd020539b /ext/pty
parent67e61153d335aecc6e1551f754a887bc294b3fa8 (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/branches/ruby_1_8@12186 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 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