[Seaside] GRPharoPlatform>>isIpAddress bug?

Marco A. Gonzalez marcoinc at mac.com
Tue Sep 20 14:59:14 UTC 2011


Hi,

I think I've discovered an problem in the following class>>method but still considering myself somewhat of a newbie, I'm not entirely sure:

GRPharoPlatform>>isIpAddress: aString
	| ip |
	ip := aString findTokens: '.'.
	^ ip size = 4
		and: [ ip allSatisfy: [ :each | each greaseInteger notNil
			and: [ each greaseInteger notNil between: 0 and: 255] ] ]


The problem is the last line "each greaseInteger notNil between: 0 and: 255"... where the notNil message returns a true or false, and it does not respond to "between:and:". I believe the fix ought to be to remove the "notNil" in the last line to result in the line:
	 "each greaseInteger between: 0 and: 255" 
since the "notNil" is already considered before the "and:".


This is from the most recent One-click download:
	Pharo1.3
	Latest update: #13307

------------------------------------------------------
Marco A. Gonzalez





More information about the seaside mailing list