summaryrefslogtreecommitdiff
path: root/lib/open3.rb
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-02-25 03:51:23 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-02-25 03:51:23 +0000
commit7ed66b9e1da2b1a364659562ff918afbec005004 (patch)
tree74fe517ce81fe2fccac087b9970e23523517a796 /lib/open3.rb
parente13f96f413dc40adaf1104decb10f80ddf636aa3 (diff)
2000-02-25
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@627 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/open3.rb')
-rw-r--r--lib/open3.rb9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/open3.rb b/lib/open3.rb
index 9e34acffc9..27283f5019 100644
--- a/lib/open3.rb
+++ b/lib/open3.rb
@@ -43,13 +43,12 @@ end
if $0 == __FILE__
a = Open3.popen3("nroff -man")
Thread.start do
- while gets
- a[0].print $_
+ while line = gets
+ a[0].print line
end
a[0].close
end
- while a[1].gets
- print ":", $_
+ while line = a[1].gets
+ print ":", line
end
end
-