MethodChange.st
changeset 3533 cccb70e595fb
parent 3519 007417da21ef
child 3560 c180c3cfe905
--- a/MethodChange.st	Wed Mar 26 18:46:20 2014 +0100
+++ b/MethodChange.st	Sun Mar 30 00:36:24 2014 +0100
@@ -313,12 +313,13 @@
         ]
     ].
 
+    newPackage := package notNil ifTrue:[package] ifFalse:[Class packageQuerySignal query].
+
     "/ if overwriting an existing method from another package,
     "/ put the existing method into the packagessafe
     oldMethodOrNil := class compiledMethodAt:selector.
     oldMethodOrNil notNil ifTrue:[
         oldPackage := oldMethodOrNil package.
-        newPackage := Class packageQuerySignal query.
         (newPackage notNil and:[newPackage ~= oldPackage]) ifTrue:[
             defClass := oldPackage asPackageId projectDefinitionClass.
             defClass notNil ifTrue:[
@@ -327,9 +328,10 @@
         ].
     ].
 
-    class compile:source classified:methodCategory logged:true.
+    (class compile:source classified:methodCategory logged:true) package: newPackage.
 
     "Modified: / 07-09-2011 / 21:09:19 / cg"
+    "Modified: / 29-03-2014 / 23:29:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !MethodChange methodsFor:'comparing'!
@@ -458,6 +460,7 @@
     "Created: / 09-10-2006 / 13:58:09 / cg"
 ! !
 
+
 !MethodChange methodsFor:'testing'!
 
 isMethodChange
@@ -527,14 +530,14 @@
 !MethodChange class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic3/MethodChange.st,v 1.76 2014-03-12 11:42:30 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic3/MethodChange.st,v 1.77 2014-03-29 23:36:24 vrany Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic3/MethodChange.st,v 1.76 2014-03-12 11:42:30 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic3/MethodChange.st,v 1.77 2014-03-29 23:36:24 vrany Exp $'
 !
 
 version_SVN
-    ^ '$Id: MethodChange.st,v 1.76 2014-03-12 11:42:30 stefan Exp $'
+    ^ '$Id: MethodChange.st,v 1.77 2014-03-29 23:36:24 vrany Exp $'
 ! !