lib/WorkingHours.rb in taskjuggler-0.0.2 vs lib/WorkingHours.rb in taskjuggler-0.0.3
- old
+ new
@@ -157,10 +157,10 @@
end
# Return true of the given WorkingHours object +wh+ is identical to this
# object.
def ==(wh)
- return false if @timezone != wh.timezone
+ return false if wh.nil? || @timezone != wh.timezone
7.times do |d|
return false if @days[d].length != wh.days[d].length
# Check all working hour intervals
@days[d].length.times do |i|