Skip to content
This repository has been archived by the owner on Jan 20, 2021. It is now read-only.

Commit

Permalink
filter out lines with NaN (because INFINITY - INFINITY = NaN, ugh) in…
Browse files Browse the repository at this point in the history
… #finite?
  • Loading branch information
jeremybmerrill committed Nov 30, 2014
1 parent e8e2ce9 commit 95df965
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/tabula/entities/ruling.rb
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,8 @@ def self.find_intersections(horizontals, verticals)
end

def finite?
top != ::Float::INFINITY && left != ::Float::INFINITY && bottom != ::Float::INFINITY && right != ::Float::INFINITY
top != ::Float::INFINITY && left != ::Float::INFINITY && bottom != ::Float::INFINITY && right != ::Float::INFINITY &&
!top.nan? && !left.nan? && !bottom.nan? && !right.nan?
end

##
Expand Down

0 comments on commit 95df965

Please sign in to comment.