String#unpack('m') fails with ArrayIndexOutOfBoundsException
-------------------------------------------------------------
Key: JRUBY-3340
URL: http://jira.codehaus.org/browse/JRUBY-3340
Project: JRuby
Issue Type: Bug
Components: Core Classes/Modules
Affects Versions: JRuby 1.1.6
Reporter: Jan Berkel
{{
# jirb
irb(main):001:0> JRUBY_VERSION
=> "1.1.6"
irb(main):001:0> "\222".unpack('m')
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: -110
at org.jruby.util.Pack.unpack(Pack.java:902)
at org.jruby.RubyString.unpack(RubyString.java:3835)
}}
org/jruby/util/Pack.java: problem is that safeGet() returns a signed byte, and
uses that as index into b64_xtable.. negative index =>
ArrayIndexOutOfBoundsException
--
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