Proc.new should return the existing proc associated with a block if one has
already been created
------------------------------------------------------------------------------------------------
Key: JRUBY-1835
URL: http://jira.codehaus.org/browse/JRUBY-1835
Project: JRuby
Issue Type: Bug
Reporter: Charles Oliver Nutter
Assignee: Charles Oliver Nutter
Fix For: JRuby 1.1b2
Fix coming.
{noformat}
describe "Proc as a block pass argument" do
def revivify(&b)
b
end
it "remains the same object if re-vivified by the target method" do
p = Proc.new {}
p2 = revivify(&p)
p.object_id.should == p2.object_id
p.should == p2
end
it "remains the same object if reconstructed with Proc.new" do
p = Proc.new {}
p2 = Proc.new(&p)
p.object_id.should == p2.object_id
p.should == p2
end
end
{noformat}
--
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