From 7abe6d1f9384aef4c8370b9cd57f1cac3ef32f58 Mon Sep 17 00:00:00 2001 From: martinahansen Date: Fri, 18 Mar 2011 17:03:43 +0000 Subject: [PATCH] filesys now polished git-svn-id: http://biopieces.googlecode.com/svn/trunk@1295 74ccb610-7750-0410-82ae-013aeee3265d --- code_ruby/Maasha/lib/filesys.rb | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/code_ruby/Maasha/lib/filesys.rb b/code_ruby/Maasha/lib/filesys.rb index f7d2b9b..6f6d8cc 100644 --- a/code_ruby/Maasha/lib/filesys.rb +++ b/code_ruby/Maasha/lib/filesys.rb @@ -33,21 +33,19 @@ class Filesys # Class method allowing open to be used on (zipped) files. # See File.open. def self.open(*args) - pp *args + args = *args + file = args.first - tyt = *args - if tyt.first == "-" + if file == "-" ios = self.new(STDIN) - elsif File.pipe? *args.first + elsif File.pipe? file ios = self.new(File.open(*args)) else ios = self.zopen(*args) end if block_given? - puts "BLOCK" begin - puts "YIELD" yield ios ensure ios.close -- 2.39.5