mirror of
https://github.com/zhigang1992/RubyMotion.git
synced 2026-04-01 09:31:20 +08:00
[NEWS] Document WeakRef to raise with unsupported classes.
This commit is contained in:
3
NEWS
3
NEWS
@@ -1,5 +1,8 @@
|
||||
= RubyMotion 2.25 =
|
||||
|
||||
* Improved use of `WeakRef' to raise an exception when trying to create a
|
||||
weak reference to one of the unsupported classes. For more information, see
|
||||
`Which classes don’t support weak references?' at http://bit.ly/1iiSOaU.
|
||||
* Fixed a bug where KVC property validation methods defined in Ruby would not
|
||||
be compiled with the appropriate (Pointer) types.
|
||||
* Added some introspection support to `ImmediateRef'. It can now report the
|
||||
|
||||
@@ -107,6 +107,11 @@ describe "WeakRef" do
|
||||
WeakRef.new(true).should == true
|
||||
WeakRef.new(false).should == false
|
||||
end
|
||||
|
||||
it "raises with classes that do not support weak references" do
|
||||
obj = NSMutableParagraphStyle.new
|
||||
lambda { WeakRef.new(obj) }.should.raise(WeakRef::RefError)
|
||||
end
|
||||
end
|
||||
|
||||
describe "Proc#weak!" do
|
||||
|
||||
2
vm
2
vm
Submodule vm updated: b199941d59...a8a981d8f3
Reference in New Issue
Block a user