Digest::MD5.new should not accept any argument
----------------------------------------------
Key: JRUBY-5147
URL: http://jira.codehaus.org/browse/JRUBY-5147
Project: JRuby
Issue Type: Bug
Affects Versions: JRuby 1.5.3
Environment: any
Reporter: Hiroshi Nakamura
Assignee: Hiroshi Nakamura
In earlier versions of CRuby 1.8, Digest::MD5.new('ABC') worked like "d =
Digest::MD5.new; d.update('ABC')" but this behavior was removed at least at
1.8.7. Current JRuby accepts
{noformat}
0% jruby -v -rdigest/md5 -e 'p Digest::MD5.new("")'
jruby 1.5.3 (ruby 1.8.7 patchlevel 249) (2010-09-28 7ca06d7) (OpenJDK 64-Bit
Server VM 1.6.0_20) [amd64-java]
#<Digest::MD5: d41d8cd98f00b204e9800998ecf8427e>
0% ruby187 -v -rdigest/md5 -e 'p Digest::MD5.new("")'
ruby 1.8.7 (2010-08-16 patchlevel 302) [x86_64-linux]
-e:1:in `initialize': wrong number of arguments (1 for 0) (ArgumentError)
from -e:1:in `new'
from -e:1
1%
{noformat}
JRuby should raise an exception as well as CRuby 1.8.7.
NB: CRuby 1.9.2 doesn't raise an exception and just ignores the given String.
This wrong behavior has been fixed at development branch. [ruby-dev:42402]
--
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