Actions
Feature #16971
openweak_ref&.some_method should behave like object&.some_method
Status:
Open
Assignee:
-
Target version:
-
Description
The following patterns mean basically the same thing and should behave the same:
weak_ref = WeakRef.new(some_object)
...
weak_ref.some_method if weak_ref.weakref_alive?()
some_object.some_method if some_object.present?
The some_object predicate got cleaned up by using &.some_method. It would be super clean if WeakRef did the same.
weak_ref = WeakRef.new(some_object)
...
weak_ref&.some_method # should not raise WeakRef::RefError
Actions
Like0
Like0