Regression: Singleton's _instantiate? method is no longer available
-------------------------------------------------------------------
Key: JRUBY-2239
URL: http://jira.codehaus.org/browse/JRUBY-2239
Project: JRuby
Issue Type: Bug
Components: Core Classes/Modules
Affects Versions: JRuby 1.1RC2
Environment: Latest JRuby 1.1RC2 rev. r6131, Linux.
Reporter: Vladimir Sizikov
Assignee: MenTaLguY
Priority: Minor
Fix For: JRuby 1.1
In rev. r6131, there were chandes done to singleton.rb: "re-implement Singleton
without relying on Thread.critical". As a side effect, the _instantiate? method
is gone, this breaks compatibility with MRI and leads to one rubyspec failure:
bin/mspec -t j spec/ruby/1.8/library/singleton/instantiate_spec.rb
.E
1)
Singleton._instantiate? returns nil until it is instantiated ERROR
undefined method `_instantiate?' for SingletonSpecs::NotInstantiated:Class:
/opt/work/rubinius/./spec/ruby/1.8/library/singleton/instantiate_spec.rb:11
/opt/work/rubinius/./mspec/runner/mspec.rb:111:in `call'
/opt/work/rubinius/./mspec/runner/mspec.rb:111:in `protect'
/opt/work/rubinius/./mspec/runner/state.rb:46:in `each'
/opt/work/rubinius/./mspec/runner/state.rb:46:in `protect'
/opt/work/rubinius/./mspec/runner/state.rb:59:in `process'
/opt/work/rubinius/./mspec/runner/state.rb:55:in `each'
/opt/work/rubinius/./mspec/runner/state.rb:55:in `process'
/opt/work/rubinius/./mspec/runner/mspec.rb:19:in `describe'
/opt/work/rubinius/./mspec/runner/object.rb:11:in `describe'
/opt/work/rubinius/./spec/ruby/1.8/library/singleton/instantiate_spec.rb:4
/opt/work/rubinius/./mspec/runner/mspec.rb:36:in `load'
/opt/work/rubinius/./mspec/runner/mspec.rb:36:in `files'
/opt/work/rubinius/./mspec/runner/mspec.rb:111:in `call'
/opt/work/rubinius/./mspec/runner/mspec.rb:111:in `protect'
/opt/work/rubinius/./mspec/runner/mspec.rb:36:in `files'
/opt/work/rubinius/./mspec/runner/mspec.rb:33:in `each'
/opt/work/rubinius/./mspec/runner/mspec.rb:33:in `files'
/opt/work/rubinius/./mspec/runner/mspec.rb:26:in `process'
mspec/bin/mspec-run:36
I understand that the change was intentional, but we need to figure out what to
do here. Is there a way to provide better alternative than just no method at
all? Should the spec be marked as not applicable to JRuby altogether?
--
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