lib/taskjuggler/LogicalExpression.rb in taskjuggler-0.0.11 vs lib/taskjuggler/LogicalExpression.rb in taskjuggler-0.1.0
- old
+ new
@@ -38,11 +38,11 @@
# PropertyTreeNode that should be used for the evaluation. _scopeProperty_
# is the PropertyTreeNode that describes the scope. It may be nil.
def eval(query)
@query = query
res = @operation.eval(self)
- return res if res.class == TrueClass || res.class == FalseClass ||
- res.class == String
+ return res if res.is_a?(TrueClass) || res.is_a?(FalseClass) ||
+ res.is_a?(String)
# In TJP syntax 'non 0' means false.
return res != 0
end
# Dump the LogicalExpression as a String. If _query_ is provided, it will