Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove (wrong) primitive usage #16780

Merged
merged 1 commit into from
Jun 17, 2024
Merged

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.

@demarey demarey merged commit 74c02ea into pharo-project:Pharo13 Jun 17, 2024
1 of 2 checks passed
@guillep guillep deleted the p13random branch June 17, 2024 09:48
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