Proc initialization magic ------------------------- Key: JRUBY-5420 URL: http://jira.codehaus.org/browse/JRUBY-5420 Project: JRuby Issue Type: Bug Affects Versions: JRuby 1.6RC1 Reporter: Hiro Asari Assignee: Thomas E Enebo Priority: Minor
# Argument error in both MRI and JRuby: {noformat} Proc.new # => tried to create Proc object without a block (ArgumentError) {noformat} # Argument error in both MRI and JRuby: {noformat} class P < Proc; end; p=P.new # => tried to create Proc object without a block (ArgumentError) {noformat} # Returns {{"hello"}} in MRI and Rubinius; ArgumentError raised in JRuby. {noformat} class P < Proc; end; def f; P.new; end; x = f {"hello"}; x.call # => "hello" {noformat} As for the last case, it just seems wrong to me that it works at all in MRI. -- 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