Skip to content

Remove (wrong) primitive usage#16780

Merged
demarey merged 1 commit intopharo-project:Pharo13from
guillep:p13random
Jun 17, 2024
Merged

Remove (wrong) primitive usage#16780
demarey merged 1 commit intopharo-project:Pharo13from
guillep:p13random

Conversation

@guillep
Copy link
Member

@guillep guillep commented Jun 17, 2024

Fix #16775
Fix hpi-swa/smalltalkCI#646 (comment)

Primitive 231 was never implemented on the VM, or at least not since a Loooong time.
See https://github.com/pharo-project/pharo-vm/compare/v10.0.5...v10.2.1

(231 239 primitiveFail)

And recently it got defined to provide an object's format:

(231 primitiveFormat)

However, it is used in the Random class, probably a leftover of some prototype.

"On Pharo"
Random class >> primitiveRandomNumber: stateArray
	"Answer a random Float in the interval [0 to 1)."

	<primitive: 231>
...

I'll propose a PR, just removing the primitive tag in primitiveRandomNumber: should be enough to get back the old behavior. We should also back port it to P12.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Randomgenerator broken

2 participants