From 047f685d738cec6a1573f600da1e84d10975e61a Mon Sep 17 00:00:00 2001 From: matz Date: Mon, 16 Apr 2007 13:56:19 +0000 Subject: * ext/pty/expect_sample.rb: avoid symbolic link representation for expect. a patch from Kazuhiro NISHIYAMA . [ruby-dev:30714] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12185 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 6 ++++++ ext/pty/expect_sample.rb | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9ab73ae5f9..b3006a5805 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Mon Apr 16 22:56:01 2007 Yukihiro Matsumoto + + * ext/pty/expect_sample.rb: avoid symbolic link representation for + expect. a patch from Kazuhiro NISHIYAMA . + [ruby-dev:30714] + Mon Apr 16 22:51:11 2007 Yukihiro Matsumoto * sample: replace TRUE, FALSE with true, false respectively. 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 -- cgit v1.2.3