[NEWS] Document WeakRef to raise with unsupported classes.

This commit is contained in:
Eloy Durán
2014-03-20 12:12:50 +01:00
parent 84e2a3b914
commit 1ba0d8baf1
3 changed files with 9 additions and 1 deletions

3
NEWS
View File

@@ -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 dont 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

View File

@@ -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

Submodule vm updated: b199941d59...a8a981d8f3