Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: JRuby 1.1.2
-
Fix Version/s: JRuby 1.2
-
Component/s: Core Classes/Modules
-
Labels:None
-
Environment:Windows XP, JRuby 1.1.3, Java 1.6
-
Number of attachments :
Description
Two Array#pack failures from ruby_test:
assert_raises(TypeError){ [nil].pack("w") }
assert_raises(TypeError){ ['a'].pack("w") }
Both raise a TypeError in MRI. In JRuby 1.1.3 the first returns "\000", while the second causes a NumberFormatException.
Indeedy. I also found a couple of more cases where JRuby is incorrect or crashes with pack('w'). All of this is added to the rubyspecs:
http://github.com/rubyspec/rubyspec/commit/d364f2b61ab39b8c0ba12d6171dc041895aacfaa