diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-11-06 07:22:39 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-11-06 07:22:39 +0000 |
commit | 818d6a1e4f145f3ff9a60933f71336a034c59536 (patch) | |
tree | 277366327de60bb4c1132c3117fe90a46cd3aa44 /ext/pty | |
parent | 113423bdff9c888195c6e22949d5d7f849a05b04 (diff) |
* eval.c (rb_load): allow interrupt during loaded program
evaluation. [ruby-dev:21834]
* hash.c (rb_hash_fetch): always warn if default argument and a
block are supplied at the same time. [ruby-dev:21842]
* hash.c (env_fetch): ditto.
* array.c (rb_ary_fetch): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4910 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/pty')
-rw-r--r-- | ext/pty/expect_sample.rb | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/ext/pty/expect_sample.rb b/ext/pty/expect_sample.rb index 1311476c5d..bf8a2352fe 100644 --- a/ext/pty/expect_sample.rb +++ b/ext/pty/expect_sample.rb @@ -4,17 +4,16 @@ # by A. Ito # # This program reports the latest version of ruby interpreter -# by connecting to ftp server at netlab.co.jp. +# by connecting to ftp server at ruby-lang.org. # require 'pty' require 'expect' fnames = [] -PTY.spawn("ftp ftp.netlab.co.jp") do - |r_f,w_f,pid| +PTY.spawn("ftp ftp.ruby-lang.org") do |r_f,w_f,pid| w_f.sync = true - $expect_verbose = true + $expect_verbose = false r_f.expect(/^Name.*: /) do w_f.print "ftp\n" @@ -31,14 +30,14 @@ PTY.spawn("ftp ftp.netlab.co.jp") do r_f.expect('word:') do w_f.print username+"@\n" end - r_f.expect("ftp> ") do - w_f.print "cd pub/lang/ruby\n" + r_f.expect("> ") do + w_f.print "cd pub/ruby\n" end - r_f.expect("ftp> ") do + r_f.expect("> ") do w_f.print "dir\n" end - r_f.expect("ftp> ") do |output| + r_f.expect("> ") do |output| for x in output[0].split("\n") if x =~ /(ruby.*\.tar\.gz)/ then fnames.push $1 |