-
-
Notifications
You must be signed in to change notification settings - Fork 29
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
610 all pharo tests pass even though i didnt solve the exercise #611
Merged
Bajger
merged 3 commits into
exercism:main
from
Bajger:610-All-pharo-tests-pass-even-though-i-didnt-solve-the-exercise
Feb 22, 2024
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
Extension { #name : #Class } | ||
|
||
{ #category : #'*ExercismPharo110' } | ||
Class >> removeFromSystem: logged [ | ||
"Forget the receiver from the Smalltalk global dictionary. Any existing instances will refer to an obsolete version of the receiver. | ||
Keep the class name and category for triggering the system change message. If we wait to long, then we get obsolete information which is not what we want. | ||
Tell class to deactivate and unload itself-- two separate events in the module system" | ||
| myCategory | | ||
self release. | ||
self unload. | ||
|
||
self superclass ifNotNil: | ||
["If we have no superclass there's nothing to be remembered" | ||
self superclass addObsoleteSubclass: self]. | ||
|
||
"we add the class to Undeclared so that if references still exist, they will be automatically fixed | ||
if this class is loaded again. We do not check if references exist as it is too slow" | ||
self binding value: nil. | ||
Undeclared declare: self name asSymbol from: Smalltalk globals. | ||
myCategory := self category. | ||
self environment forgetClass: self logged: logged. | ||
self obsolete. | ||
logged ifTrue: [SystemAnnouncer uniqueInstance classRemoved: self fromCategory: myCategory] | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Package { #name : #ExercismPharo110 } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As per discussion on Pharo Discord. Solution recommended by one of founders: https://discord.com/channels/223421264751099906/278558427796602882/1209857931022049280