Array#pack problem
------------------
Key: JRUBY-3677
URL: http://jira.codehaus.org/browse/JRUBY-3677
Project: JRuby
Issue Type: Bug
Affects Versions: JRuby 1.2
Reporter: Jani Soila
Assignee: Thomas E Enebo
Priority: Critical
An * in pack format stops reading the array too early, leaving the last item
missing from the result. The following code works with MRI 1.8.6, but JRuby
1.2.0 causes the error.
a = ["head", 1, 1, 1]
str1 = a.pack("A4N*")
str2 = a.pack("A4N3")
puts "str1: #{str1.size}, str2: #{str2.size}"
if str1.size != str2.size
raise 'Array#pack produces incorrect results'
end
Problem found by Ville Nikula and Jani Soila.
--
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