Zip::ZipFile.open() fails only in JRuby (rubyzip)
-------------------------------------------------
Key: JRUBY-1230
URL: http://jira.codehaus.org/browse/JRUBY-1230
Project: JRuby
Issue Type: Bug
Affects Versions: JRuby 1.0.0
Environment: $ uname -a
Linux caffe.sfbay.sun.com 2.6.20-1.2962.fc6 #1 SMP Tue Jun 19 18:50:05 EDT 2007
x86_64 x86_64 x86_64 GNU/Linux
$ java -version
java version "1.6.0_02"
Java(TM) SE Runtime Environment (build 1.6.0_02-b05)
Java HotSpot(TM) 64-Bit Server VM (build 1.6.0_02-b05, mixed mode)
rubyzip version 0.9.1
Reporter: Nathan Fiedler
Assignee: Thomas E Enebo
% jirb
irb(main):002:0> require 'rubygems'
=> true
irb(main):003:0> require 'zip/zip'
=> true
irb(main):004:0> Zip::ZipFile.open('path/to/file.zip')
TypeError: can't dup NilClass
from
/opt/jruby-1.0/lib/ruby/gems/1.8/gems/rubyzip-0.9.1/lib/zip/zip.rb:1369:in `map'
from
/opt/jruby-1.0/lib/ruby/gems/1.8/gems/rubyzip-0.9.1/lib/zip/zip.rb:1132:in `dup'
from
/opt/jruby-1.0/lib/ruby/gems/1.8/gems/rubyzip-0.9.1/lib/zip/zip.rb:1369:in
`initialize'
from
/opt/jruby-1.0/lib/ruby/gems/1.8/gems/rubyzip-0.9.1/lib/zip/zip.rb:1379:in `new'
from
/opt/jruby-1.0/lib/ruby/gems/1.8/gems/rubyzip-0.9.1/lib/zip/zip.rb:1379:in
`open'
from (irb):4:in `binding'
from /opt/jruby-1.0/lib/ruby/1.8/irb.rb:150:in `eval_input'
from /opt/jruby-1.0/lib/ruby/1.8/irb.rb:70:in `signal_status'
from /opt/jruby-1.0/lib/ruby/1.8/irb.rb:189:in `eval_input'
from /opt/jruby-1.0/lib/ruby/1.8/irb.rb:70:in `each_top_level_statement'
from /opt/jruby-1.0/lib/ruby/1.8/irb.rb:190:in `loop'
from /opt/jruby-1.0/lib/ruby/1.8/irb.rb:190:in `catch'
from /opt/jruby-1.0/lib/ruby/1.8/irb.rb:190:in `eval_input'
from /opt/jruby-1.0/lib/ruby/1.8/irb.rb:70:in `start'
from :-1:in `catch'
from /opt/jruby-1.0/lib/ruby/1.8/irb.rb:71:in `start'
from :-1irb(main):005:0>
It seems that the rubyzip code is failing to successfully read the zip file,
but it does not realize and results in the error. This exact same sequence
works fine with native irb.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email