From 0290d2fe57dc11e40784a2f56ac93da11fbce799 Mon Sep 17 00:00:00 2001 From: dinko Date: Sun, 24 Dec 2006 07:55:12 +0000 Subject: [PATCH] git-svn-id: http://stonecode.svnrepository.com/svn/ruport/trunk@400 bb2e8eb0-7117-0410-aac4-c024b40ed5f7 --- lib/ruport/data/table.rb | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/lib/ruport/data/table.rb b/lib/ruport/data/table.rb index e0707af7..b9107a17 100644 --- a/lib/ruport/data/table.rb +++ b/lib/ruport/data/table.rb @@ -467,22 +467,14 @@ module Kernel # t = Table("bar.csv", :has_names => false) def Table(*args,&block) table= - if args.length == 1 - case(args[0]) + case(args[0]) when Array [].to_table(args[0]) when /\.csv/ - Ruport::Data::Table.load(args[0]) - else - # for Table("a") - [].to_table([args[0]]) - end - else - if args[0] =~ /\.csv/ Ruport::Data::Table.load(*args) else + # for Table("a") [].to_table(args) - end end block[table] if block