smalltalk: Object>>perform: family + 10 tests
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Has been cancelled

This commit is contained in:
2026-04-25 08:42:08 +00:00
parent 9954a234ae
commit 4ced16f04e
3 changed files with 68 additions and 1 deletions

View File

@@ -529,6 +529,16 @@
(cond
((st-class-ref? receiver) (st-class-ref "Metaclass"))
(else (st-class-ref cls))))
;; perform: / perform:with: / perform:withArguments:
((= selector "perform:")
(st-send receiver (str (nth args 0)) (list)))
((= selector "perform:withArguments:")
(st-send receiver (str (nth args 0)) (nth args 1)))
((or (= selector "perform:with:")
(= selector "perform:with:with:")
(= selector "perform:with:with:with:")
(= selector "perform:with:with:with:with:"))
(st-send receiver (str (nth args 0)) (slice args 1 (len args))))
((or (= cls "SmallInteger") (= cls "Float"))
(st-num-send receiver selector args))
((or (= cls "String") (= cls "Symbol"))