It's expected the following getter would return 0:
dtmf_frame.end_of_event
#=> 0
Actual result:
dtmf_frame.end_of_event
#=> 1
Cause
The previous un-setter is trying to negate END_OF_EVENT, but does so by subtracting 15 - 128:
@flags &= (0xf - END_OF_EVENT)
This does not produce the intended effect, and end-of-event remains set. (Additionally, side effects on other properties in @flags are also possible).
Not really a big deal
Rest assured however, this "bug" doesn't actually exhibit bad behavior in sippy_cup. Because its code never sets dtmf_frame.end_of_event more than 1 time per instance. There is no place in the code where multiple values are set for end_of_event of the same dtmf_frame instance. So this is a theoretical bug, at best.
Given this setter:
It's expected the following getter would return 0:
Actual result:
Cause
The previous un-setter is trying to negate END_OF_EVENT, but does so by subtracting
15 - 128
:This does not produce the intended effect, and end-of-event remains set. (Additionally, side effects on other properties in
@flags
are also possible).Not really a big deal
Rest assured however, this "bug" doesn't actually exhibit bad behavior in sippy_cup. Because its code never sets dtmf_frame.end_of_event more than 1 time per instance. There is no place in the code where multiple values are set for end_of_event of the same dtmf_frame instance. So this is a theoretical bug, at best.