# Spreadsheet module tests fail

**URL:** <https://www.ruby-forum.com/t/spreadsheet-module-tests-fail/76702>\
**Category:** Ruby\
**Created:** [November 20, 2006, 4:07pm UTC](https://www.ruby-forum.com/t/spreadsheet-module-tests-fail/76702 "2006-11-20T16:07:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![el-gato](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/e0b2c6/32.png) [@el-gato](https://www.ruby-forum.com/u/el-gato)\
**Post date:** [November 20, 2006, 4:07pm UTC](https://www.ruby-forum.com/t/spreadsheet-module-tests-fail/76702/1 "2006-11-20T16:07:09Z")

</div>

I’m trying to use the spreadsheet/excel module by Daniel B., but  
it’s failing its tests on the olewriter. Any thoughts?

# ruby test/ts\_all.rb

Loaded suite test/ts\_all  
Started  
…E/tmp/spreadsheet-0.3.4/lib/spreadsheet/olewriter.rb:22:  
[BUG] rb\_sys\_fail() - errno == 0  
ruby 1.8.1 (2003-12-25) [sparc-solaris2.8]

Here’s the code around line 22 of olewriter.rb

```
 8 class OLEWriter < IO
 9
10 # Not meant for public consumption
11 MaxSize = 7087104
12 BlockSize = 4096
13 BlockDiv = 512
14 ListBlocks = 127
15
16 attr_reader :biff_size, :book_size, :big_blocks, :list_blocks
17 attr_reader :root_start, :size_allowed
18
19 # Accept an IO object, a fileno, or a String
20 def initialize(arg, &block)
21 if arg.kind_of?(String)
22 super(File.open(arg, "w+").fileno, "w+", &block)
23 elsif arg.respond_to?(:fileno)
24 super(arg.fileno, "w+", &block)
25 else
26 super(arg, "w+", &block)
27 end
28 binmode
```

---

<div class="post-metadata">

**Author:** ![el-gato](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/e0b2c6/32.png) [@el-gato](https://www.ruby-forum.com/u/el-gato)\
**Post date:** [November 20, 2006, 4:50pm UTC](https://www.ruby-forum.com/t/spreadsheet-module-tests-fail/76702/2 "2006-11-20T16:50:53Z")

</div>

El Gato wrote:

> I’m trying to use the spreadsheet/excel module by Daniel B., but  
> it’s failing its tests on the olewriter. Any thoughts?
> 
> # ruby test/ts\_all.rb
> 
> Loaded suite test/ts\_all  
> Started  
> …E/tmp/spreadsheet-0.3.4/lib/spreadsheet/olewriter.rb:22:  
> [BUG] rb\_sys\_fail() - errno == 0  
> ruby 1.8.1 (2003-12-25) [sparc-solaris2.8]

First, I no longer maintain this package. It’s now maintained by  
Hannes W…

Second, you’ve got an old version of spreadsheet. Use 0.3.5, available  
at [http://rubyforge.org/frs/?group\_id=678&release\_id=6674](http://rubyforge.org/frs/?group_id=678&release_id=6674)

Third, you’ve got an old version of Ruby. Even blastwave has a 1.8.4  
package if you want a more recent version. Or, you could build 1.8.5  
by hand.

Regards,

Dan

---

<div class="post-metadata">

**Author:** ![el-gato](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/e0b2c6/32.png) [@el-gato](https://www.ruby-forum.com/u/el-gato)\
**Post date:** [November 20, 2006, 6:31pm UTC](https://www.ruby-forum.com/t/spreadsheet-module-tests-fail/76702/3 "2006-11-20T18:31:20Z")

</div>

Daniel B. wrote:

> First, I no longer maintain this package. It’s now maintained by  
> Hannes W…
> 
> Second, you’ve got an old version of spreadsheet. Use 0.3.5, available  
> at [http://rubyforge.org/frs/?group\_id=678&release\_id=6674](http://rubyforge.org/frs/?group_id=678&release_id=6674)
> 
> Third, you’ve got an old version of Ruby. Even blastwave has a 1.8.4  
> package if you want a more recent version. Or, you could build 1.8.5  
> by hand.
> 
> Regards,
> 
> Dan

Well, I realized that 0.3.5 was out, however, I could not find a way to  
download it. As it turns out, I was just not noticing that the  
rubyforge spreadsheet entry had the code. When I look at the main  
spreadsheet page the download link says:

spreadsheet parseexcel-0.5.1.1 August 29, 2006 Release Notes -  
Monitor this package Download

I was under the impression that parseexcel was a different module and  
didn’t realize that once I clicked the link to download that I would be  
presented with the latest version of the spreadsheet module.

As to my version of Ruby… well, that won’t change anytime soon.

Thanks, the new version seems to pass the tests.
