zaadjis created JRUBY-6351:
------------------------------
Summary: Unexpected error when trying to base64 encode nil
Key: JRUBY-6351
URL: https://jira.codehaus.org/browse/JRUBY-6351
Project: JRuby
Issue Type: Bug
Components: Core Classes/Modules
Affects Versions: JRuby 1.6.5
Environment: jruby 1.6.5.1 (ruby-1.8.7-p330) (2011-12-27 1bf37c2)
(OpenJDK 64-Bit Server VM 1.6.0_23) [linux-amd64-java]
Reporter: zaadjis
*Steps to reproduce:*
{code:none}
$ rvm use jruby-1.6.5.1
$ ruby -v
jruby 1.6.5.1 (ruby-1.8.7-p330) (2011-12-27 1bf37c2) (OpenJDK 64-Bit Server VM
1.6.0_23) [linux-amd64-java]
$ ruby -rbase64 -e 'p Base64.encode64 nil'
TypeError: wrong argument type NilClass (expected Integer)
pack at org/jruby/RubyArray.java:4078
encode64 at /home/zaadjis/.rvm/rubies/jruby-1.6.5.1/lib/ruby/1.8/base64.rb:97
(root) at -e:1
{code}
*Expected output (as on v1.6.4):*
{code:none}
$ rvm use jruby-1.6.4
$ ruby -v
jruby 1.6.4 (ruby-1.8.7-p330) (2011-08-23 17ea768) (OpenJDK 64-Bit Server VM
1.6.0_23) [linux-amd64-java]
$ ruby -rbase64 -e 'p Base64.encode64 nil'
""
{code}
Seems this is a regression. If not, the error message should be less confusing
than "wrong argument type NilClass *(expected Integer)*".
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://jira.codehaus.org/secure/ContactAdministrators!default.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