Hello, Just tried to use RubyZip with IronRuby (porting a rake task onto irake) and I received the following error: rake aborted! wrong number of arguments (2 for 0) c:/ironruby/lib/ironruby/gems/1.8/gems/rubyzip-0.9.1/lib/zip/zip.rb:1073:in `initialize'' c:/ironruby/lib/ironruby/gems/1.8/gems/rubyzip-0.9.1/lib/zip/zip.rb:1000:in `get_compressor'' c:/ironruby/lib/ironruby/gems/1.8/gems/rubyzip-0.9.1/lib/zip/zip.rb:995:in `init_next_entry'' c:/ironruby/lib/ironruby/gems/1.8/gems/rubyzip-0.9.1/lib/zip/zip.rb:957:in `put_next_entry'' c:/ironruby/lib/ironruby/gems/1.8/gems/rubyzip-0.9.1/lib/zip/zip.rb:803:in `write_to_zip_output_stream'' c:/ironruby/lib/ironruby/gems/1.8/gems/rubyzip-0.9.1/lib/zip/zip.rb:1482:in `commit'' c:/ironruby/lib/ironruby/gems/1.8/gems/rubyzip-0.9.1/lib/zip/zip.rb:1123:in `each'' c:/ironruby/lib/ironruby/gems/1.8/gems/rubyzip-0.9.1/lib/zip/zip.rb:1482:in `commit'' c:/ironruby/lib/ironruby/gems/1.8/gems/rubyzip-0.9.1/lib/zip/zip.rb:937:in `open'' c:/ironruby/lib/ironruby/gems/1.8/gems/rubyzip-0.9.1/lib/zip/zip.rb:1479:in `commit'' Line of code is: @zlibDeflater = Zlib::Deflate.new(level, -Zlib::MAX_WBITS) Method: def initialize(outputStream, level = Zlib::DEFAULT_COMPRESSION) super() @outputStream = outputStream @zlibDeflater = Zlib::Deflate.new(level, -Zlib::MAX_WBITS) @size = 0 @crc = Zlib::crc32 end Any ideas what is causing the problem? My IronRuby version is irb 0.9.5(05/04/13) Thanks Ben
jirapong.nanta at gmail.com
2009-Oct-15 16:10 UTC
[Ironruby-core] IronRuby, RubyZip and ZLib == error
Hi Benz, IronRuby has Standard zlib built-in. Can you try this? require ''zlib'' z = Zlib::Deflate.new dst = z.deflate(''foo'', Zlib::FINISH) Hope this helps, -Jirapong On Oct 15, 2009, at 10:48 PM, Ben Hall wrote:> Hello, > > Just tried to use RubyZip with IronRuby (porting a rake task onto > irake) and I received the following error: > > rake aborted! > wrong number of arguments (2 for 0) > c:/ironruby/lib/ironruby/gems/1.8/gems/rubyzip-0.9.1/lib/zip/zip.rb: > 1073:in > `initialize'' > c:/ironruby/lib/ironruby/gems/1.8/gems/rubyzip-0.9.1/lib/zip/zip.rb: > 1000:in > `get_compressor'' > c:/ironruby/lib/ironruby/gems/1.8/gems/rubyzip-0.9.1/lib/zip/zip.rb: > 995:in > `init_next_entry'' > c:/ironruby/lib/ironruby/gems/1.8/gems/rubyzip-0.9.1/lib/zip/zip.rb: > 957:in > `put_next_entry'' > c:/ironruby/lib/ironruby/gems/1.8/gems/rubyzip-0.9.1/lib/zip/zip.rb: > 803:in > `write_to_zip_output_stream'' > c:/ironruby/lib/ironruby/gems/1.8/gems/rubyzip-0.9.1/lib/zip/zip.rb: > 1482:in > `commit'' > c:/ironruby/lib/ironruby/gems/1.8/gems/rubyzip-0.9.1/lib/zip/zip.rb: > 1123:in > `each'' > c:/ironruby/lib/ironruby/gems/1.8/gems/rubyzip-0.9.1/lib/zip/zip.rb: > 1482:in > `commit'' > c:/ironruby/lib/ironruby/gems/1.8/gems/rubyzip-0.9.1/lib/zip/zip.rb: > 937:in > `open'' > c:/ironruby/lib/ironruby/gems/1.8/gems/rubyzip-0.9.1/lib/zip/zip.rb: > 1479:in > `commit'' > > Line of code is: @zlibDeflater = Zlib::Deflate.new(level, - > Zlib::MAX_WBITS) > > Method: > def initialize(outputStream, level = Zlib::DEFAULT_COMPRESSION) > super() > @outputStream = outputStream > @zlibDeflater = Zlib::Deflate.new(level, -Zlib::MAX_WBITS) > @size = 0 > @crc = Zlib::crc32 > end > > Any ideas what is causing the problem? > > My IronRuby version is irb 0.9.5(05/04/13) > > Thanks > > Ben > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core