spreadsheet 0.6.5.3 → 0.6.5.4

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,3 +1,10 @@
1
+ === 0.6.5.4 / 18.4.2011
2
+
3
+ * Updated worksheet.rb according to the Patch of Björn Andersson.
4
+
5
+ * https://gist.github.com/925007#file_test.patch
6
+ * http://url.ba/09p9
7
+
1
8
  === 0.6.5.3 / 23.3.2011
2
9
 
3
10
  * Updated Txt lib/spreadsheet/excel/writer/biff8.rb with a Patch from Alexandre Bini
data/lib/spreadsheet.rb CHANGED
@@ -42,7 +42,7 @@ module Spreadsheet
42
42
 
43
43
  ##
44
44
  # The version of Spreadsheet you are using.
45
- VERSION = '0.6.5.3'
45
+ VERSION = '0.6.5.4'
46
46
 
47
47
  ##
48
48
  # Default client Encoding. Change this value if your application uses a
@@ -89,7 +89,7 @@ class Worksheet
89
89
  def need_number? cell
90
90
  if cell.is_a?(Numeric) && cell.abs > 0x1fffffff
91
91
  true
92
- elsif cell.is_a?(Float)
92
+ elsif cell.is_a?(Float) and not cell.nan?
93
93
  higher = cell * 100
94
94
  if higher == higher.to_i
95
95
  need_number? higher.to_i
@@ -14,6 +14,7 @@ class TestWorksheet < Test::Unit::TestCase
14
14
  assert_equal false, sheet.need_number?(114.55)
15
15
  assert_equal false, sheet.need_number?(0.1)
16
16
  assert_equal false, sheet.need_number?(0.01)
17
+ assert_equal false, sheet.need_number?(0 / 0.0) # NaN
17
18
  assert_equal true, sheet.need_number?(0.001)
18
19
  assert_equal true, sheet.need_number?(10000000.0)
19
20
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spreadsheet
3
3
  version: !ruby/object:Gem::Version
4
- hash: 109
4
+ hash: 99
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 6
9
9
  - 5
10
- - 3
11
- version: 0.6.5.3
10
+ - 4
11
+ version: 0.6.5.4
12
12
  platform: ruby
13
13
  authors:
14
14
  - Masaomi Hatakeyama, Zeno R.R. Davatz
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2011-03-23 00:00:00 +01:00
19
+ date: 2011-04-18 00:00:00 +02:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency