oops - care for the case where a method has a different source
file as the class (happens, if compressed onto st.src)
--- a/Method.st Tue Jan 14 17:42:21 1997 +0100
+++ b/Method.st Tue Jan 14 22:19:53 1997 +0100
@@ -453,6 +453,7 @@
aStream := fileName asFilename readStream.
].
].
+
aStream isNil ifTrue:[
"/
"/ nope - ask my class for the source (this also invokes the SCMgr)
@@ -461,6 +462,13 @@
who notNil ifTrue:[
myClass := who methodClass.
aStream := myClass sourceStreamFor:source.
+ aStream pathName asFilename baseName ~= source asFilename baseName
+ ifTrue:[
+ "/ oops - not really
+ 'Method [info]: do not trust my classes source' infoPrintCR.
+ aStream close.
+ aStream := nil.
+ ]
].
aStream isNil ifTrue:[
@@ -521,8 +529,8 @@
].
^ junk
- "Modified: 1.11.1996 / 16:26:21 / cg"
"Modified: 7.1.1997 / 16:20:09 / stefan"
+ "Modified: 14.2.1997 / 22:10:15 / cg"
!
source:aString
@@ -2712,6 +2720,6 @@
!Method class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/Method.st,v 1.119 1997-01-10 17:56:15 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Method.st,v 1.120 1997-01-14 21:19:53 cg Exp $'
! !
Method initialize!