Skip to content

Commit

Permalink
Actually implement -[RLMObject isFrozen]
Browse files Browse the repository at this point in the history
  • Loading branch information
tgoyne committed Jun 9, 2020
1 parent 9ff304e commit 7fef541
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 1 addition & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ x.y.z Release notes (yyyy-MM-dd)
* None.

### Fixed
* <How to hit and notice issue? what was the impact?> ([#????](https://github.com/realm/realm-cocoa/issues/????), since v?.?.?)
* None.
* `-[RLMObject isFrozen]` always returned false. ([#6568](https://github.com/realm/realm-cocoa/issues/6568), since 5.0.0).

<!-- ### Breaking Changes - ONLY INCLUDE FOR NEW MAJOR version -->

Expand Down
4 changes: 4 additions & 0 deletions Realm/RLMObject.mm
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,10 @@ - (instancetype)freeze {
return RLMObjectFreeze(self);
}

- (BOOL)isFrozen {
return _realm.isFrozen;
}

- (RLMNotificationToken *)addNotificationBlock:(RLMObjectChangeBlock)block {
return RLMObjectAddNotificationBlock(self, block, nil);
}
Expand Down
2 changes: 1 addition & 1 deletion Realm/Tests/ObjectTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -1354,7 +1354,7 @@ - (void)testIsFrozen {
IntObject *frozen = [managed freeze];
XCTAssertFalse(standalone.isFrozen);
XCTAssertFalse(managed.isFrozen);
XCTAssertFalse(frozen.isFrozen);
XCTAssertTrue(frozen.isFrozen);
}

- (void)testFreezeUnmanagedObject {
Expand Down

0 comments on commit 7fef541

Please sign in to comment.