Closed viralpraxis closed 7 months ago
Inheriting from BasicObject
might be a bit too much š I guess we can simply raise (on class loading) if someone defines input :object_id
or similiar @sunny ?
Yeah it would add a bit of safety to prevent things we think might be a dangerous name to override now (success
, failure
for example), fails for now (object_id
for example), or that we know will cause chaos today (overriding call
or any other internal method).
Iād be happy to accept a PR for that šš»
OutputWithBlacklistedName.call(value: 1).object_id != 2
Before https://github.com/sunny/actor/pull/127 object_id would be correctly set (I doubt that overriding
object_id
is a good idea though).One possible solution is to inherit
Result
from BasicObject and explicitly disallowoutput
names that collide withResult.instance_methods