[#30722] JSON ライブラリの取り込み — "NARUSE, Yui" <naruse@...>

naruseです。

20 messages 2007/04/21

[ruby-dev:30714] ext/pty/expect_sample.rb

From: Kazuhiro NISHIYAMA <zn@...>
Date: 2007-04-16 11:13:48 UTC
List: ruby-dev #30714
西山和広です。

expect_sample.rb を試してみたら、expect("> ")がシンボリックリンクに
ひっかかって、うまく動いていませんでした。


-- 
|ZnZ(ゼット エヌ ゼット)
|西山和広(Kazuhiro NISHIYAMA)

Attachments (1)

ext-pty-expect_sample.diff (473 Bytes, text/x-diff)
Index: ext/pty/expect_sample.rb
===================================================================
--- ext/pty/expect_sample.rb	(revision 12182)
+++ ext/pty/expect_sample.rb	(working copy)
@@ -37,9 +37,9 @@
     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

In This Thread

Prev Next