compiler/PPCCompiler.st
changeset 543 02d90f0038fd
parent 538 16e8536f5cfb
--- a/compiler/PPCCompiler.st	Tue Sep 08 02:06:11 2015 +0100
+++ b/compiler/PPCCompiler.st	Tue Sep 08 02:40:05 2015 +0100
@@ -100,12 +100,26 @@
     [ 
         index := passes indexOf: pass.
         index ~~ 0
-    ] whileTrue:[ 
-        passes removeAtIndex: index
+    ] whileTrue:[
+        "Fuck it!!  
+         Pharo does not have #removeAtIndex: which is actually
+         and ANSI protocol. But Pharoers do not like ANSI and don't
+         give a shit about compatibility. Hence the following piece 
+         of crap."
+        (passes respondsTo: #removeAtIndex:) ifTrue:[ 
+            passes removeAtIndex: index.
+        ] ifFalse:[ 
+            "Try Pharo's non-standard removeAt:"
+            (passes respondsTo: #removeAt:) ifTrue:[ 
+                passes removeAt: index
+            ] ifFalse:[ 
+                self error: 'Don''t know how to remove object at index...'
+            ].
+        ].
     ].
 
     "Created: / 04-09-2015 / 11:24:45 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified: / 04-09-2015 / 16:02:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 08-09-2015 / 02:36:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !PPCCompiler methodsFor:'compiling'!