Array#pack fails to raise ArgumentError when called with a wrong number of
parameters
-------------------------------------------------------------------------------------
Key: JRUBY-4967
URL: http://jira.codehaus.org/browse/JRUBY-4967
Project: JRuby
Issue Type: Bug
Affects Versions: JRuby 1.5.1
Environment: jruby 1.5.1 (ruby 1.8.7 patchlevel 249) (2010-06-06
f3a3480) (Java HotSpot(TM) 64-Bit Server V
M 1.6.0_20) [amd64-java]
Reporter: Marco Ceresa
Assignee: Thomas E Enebo
Priority: Minor
Here is an example session with MRI
$ irb
irb(main):001:0> [0].pack("CC")
ArgumentError: too few arguments
from (irb):1:in `pack'
from (irb):1
from :0
The same method called in jruby generates a
java.lang.ArrayIndexOutOfBoundsException error
$ jirb
irb(main):001:0> [0].pack("CC")
RubyArray.java:776:in `eltInternal': java.lang.ArrayIndexOutOfBoundsException: 1
from Pack.java:1343:in `encode'
from Pack.java:1640:in `pack'
from RubyArray.java:3404:in `pack'
[...]
--
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