Skip to content

Commit

Permalink
fixed -inf
Browse files Browse the repository at this point in the history
  • Loading branch information
AE9RB committed Jul 24, 2011
1 parent 91f83af commit 6950b1c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/redis/sender.rb
Expand Up @@ -13,9 +13,9 @@ def send_redis data
collect << :':1'
elsif Float === data and data.nan?
collect << :':0'
elsif Float === data and data.infinite? || 0 > 0
elsif Float === data and (data.infinite? || 0) > 0
collect << :':inf'
elsif Float === data and data.infinite? || 0 < 0
elsif Float === data and (data.infinite? || 0) < 0
collect << :':-inf'
elsif Hash === data
collect << "*#{data.size * 2}"
Expand Down

0 comments on commit 6950b1c

Please sign in to comment.