summaryrefslogtreecommitdiff
path: root/lib/task.rb
diff options
context:
space:
mode:
authormguetlein <martin.guetlein@gmail.com>2011-02-08 08:57:31 +0100
committermguetlein <martin.guetlein@gmail.com>2011-02-08 08:57:31 +0100
commitc37cc91893457cb91ddb2a32b9ac76090bd6c521 (patch)
tree529f6465f8f431c42e03140b2f6ccfe2ac5c149d /lib/task.rb
parent281a0bade2ca1d1bb040c54704650b69f6da24a5 (diff)
not using rapper directly, use rest client and tmp-file
Diffstat (limited to 'lib/task.rb')
-rw-r--r--lib/task.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/task.rb b/lib/task.rb
index 73d880e..ca18d7b 100644
--- a/lib/task.rb
+++ b/lib/task.rb
@@ -303,7 +303,7 @@ module OpenTox
class SubTask
def initialize(task, min, max)
- raise "not a task or subtask" unless task.is_a?(Task) or task.is_a?(SubTask)
+ raise "not a task or subtask" if task!=nil and !(task.is_a?(Task) or task.is_a?(SubTask))
raise "invalid max ("+max.to_s+"), min ("+min.to_s+") params" unless
min.is_a?(Numeric) and max.is_a?(Numeric) and min >= 0 and max <= 100 and max > min
@task = task