Skip to content

correct mutating functions #1000

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

Merged
merged 3 commits into from
Aug 23, 2025
Merged

Conversation

depial
Copy link
Contributor

@depial depial commented Aug 23, 2025

I've added some more code examples in instructions.md to make clear that title is a mutating function.

Also, I have changed the names of the functions title and revive to title! and revive! (to reflect that they are indeed mutating functions) in role-playing-game.jl and runtests.jl. I've made runtests.jl backwards compatible, so the current solutions won't break since I think it would be pointless to make everyone copy and paste their current solutions with new function names. The change in exemplar.jl will come in following commit.

This PR should take [no important files changed] in the merge commit body.

Copy link
Contributor

This PR touches files which potentially affect the outcome of the tests of an exercise. This will cause all students' solutions to affected exercises to be re-tested.

If this PR does not affect the result of the test (or, for example, adds an edge case that is not worth rerunning all tests for), please add the following to the merge-commit message which will stops student's tests from re-running. Please copy-paste to avoid typos.

[no important files changed]

For more information, refer to the documentation. If you are unsure whether to add the message or not, please ping @exercism/maintainers-admin in a comment. Thank you!

@depial
Copy link
Contributor Author

depial commented Aug 23, 2025

Working on backwards compatibility...

@colinleach
Copy link
Contributor

Thanks for tackling this. Good luck!

@depial
Copy link
Contributor Author

depial commented Aug 23, 2025

I needed to leave the new assignment in the global scope, so this should be backwards compatible now.

@depial depial requested a review from colinleach August 23, 2025 15:37
@depial depial changed the title correct mutable functions correct mutating functions Aug 23, 2025
@depial depial merged commit 3d74f16 into exercism:main Aug 23, 2025
5 checks passed
@depial depial deleted the role-playing-game-update branch August 23, 2025 15:45
@depial
Copy link
Contributor Author

depial commented Aug 23, 2025

Great! Looks like it's working on the site. Both of my solutions, with the old and new function names, work.

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.

2 participants