You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bug description NumberParser includes an instance variable called failBlock. If you look at the references this variable is used inconsistently across the methods. In some methods is evaluated by sending the message value as if it was a block without arguments, and in other methods is evaluated by sending cull:cull:. So currently, if failBlock is configured with a two-argument block and the input given to the parser makes it to use one of the methods sending value it will fail.
To Reproduce
Steps to reproduce the behavior:
Open a Playground and evaluate:
|p|
p := NumberParser new.
p on: '-'.
p failBlock: [ :a :b | ].
p nextInteger
Expected behavior
If two-argument blocks are to be expected (as is suggested by expected: method that provides an error description and the index of the stream), then fail method needs to be updated so two-argument blocks will not fail.
Version information:
Pharo Version 9
Expected development cost
Easy to fix. I will propose a PR.
The text was updated successfully, but these errors were encountered:
Bug description
NumberParser
includes an instance variable calledfailBlock
. If you look at the references this variable is used inconsistently across the methods. In some methods is evaluated by sending the messagevalue
as if it was a block without arguments, and in other methods is evaluated by sendingcull:cull:
. So currently, iffailBlock
is configured with a two-argument block and the input given to the parser makes it to use one of the methods sending value it will fail.To Reproduce
Steps to reproduce the behavior:
Open a Playground and evaluate:
Expected behavior
If two-argument blocks are to be expected (as is suggested by
expected:
method that provides an error description and the index of the stream), thenfail
method needs to be updated so two-argument blocks will not fail.Version information:
Expected development cost
Easy to fix. I will propose a PR.
The text was updated successfully, but these errors were encountered: