rock-core / tools-roby

The roby plan manager
Other
3 stars 11 forks source link

fix: make method_missing return a new object in DelayedArgumentFromObject #238

Closed doudou closed 1 year ago

doudou commented 1 year ago

The current method was modifying the object in place, which would cause the following awkward situation:

obj = from_state.something
obj.bla

# Now, `obj` points to State.something.bla

Which is already bad in general, but also means that any wrong code that would call a method missing could modify some unrelated default argument.