ObjectSpace#define_finalizer behavior does not match MRI
--------------------------------------------------------
Key: JRUBY-1993
URL: http://jira.codehaus.org/browse/JRUBY-1993
Project: JRuby
Issue Type: Bug
Components: Core Classes/Modules
Affects Versions: JRuby 1.1RC1
Environment: Latest JRuby 1.1RC1
Reporter: Vladimir Sizikov
Assignee: Vladimir Sizikov
ObjectSpace#define_finalizer's behavior in MRI is that any object that responds
to "call" is permitted.
JRuby requires Proc or object that can be converted to proc via "to_proc".
This leads to one rubyspec failure:
ObjectSpace#define_finalizer complains if the action doesn't respond to call
FAILED
Expected ArgumentError but got TypeError (can't convert Fixnum into Proc):
./mspec/expectations.rb:10:in `fail_with'
./mspec/expectations/should.rb:6:in `should'
/opt/work/rubinius/./spec/ruby/1.8/core/objectspace/define_finalizer_spec.rb:14
/opt/work/rubinius/./spec/ruby/1.8/core/objectspace/define_finalizer_spec.rb:14:in
`call'
./mspec/runner/runner.rb:136:in `describe'
./mspec/runner/runner.rb:135:in `each'
./mspec/runner/runner.rb:130:in `describe'
./mspec/runner/runner.rb:135:in `describe'
/opt/work/rubinius/./spec/ruby/1.8/core/objectspace/define_finalizer_spec.rb:4
/opt/work/rubinius/./spec/ruby/1.8/core/objectspace/define_finalizer_spec.rb:4:in
`load'
tmp/last_ci.rb:52
tmp/last_ci.rb:44:in `each'
tmp/last_ci.rb:44
Fix is coming (hopefully)
--
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