Number >> asRectangle throws exception

Project:GNU Smalltalk
Component:Base classes
Category:bug
Priority:normal
Assigned:Unassigned
Status:fixed
Description

GNU Smalltalk ready

st> 2 asRectangle
Object: Rectangle error: did not understand #left:top:right:bottom:
MessageNotUnderstood(Exception)>>signal
Rectangle class(Object)>>doesNotUnderstand: #left:top:right:bottom:
SmallInteger(Number)>>asRectangle
UndefinedObject>>executeStatements
nil
st> 

Updates

#1 submitted by Paolo Bonzini on Fri, 10/03/2008 - 19:51
Status:active» fixed

Thanks!

diff --git a/kernel/Rectangle.st b/kernel/Rectangle.st
index da75cbd..505157e 100644
--- a/kernel/Rectangle.st
+++ b/kernel/Rectangle.st
@@ -62,7 +62,7 @@ Object subclass: Rectangle [
        ^self basicNew origin: originPoint corner: originPoint + extentPoint
     ]
 
-    Rectangle class >> left: leftNumber right: rightNumber top: topNumber bottom: bottomNumber [
+    Rectangle class >> left: leftNumber top: topNumber right: rightNumber bottom: bottomNumber [
        "Answer a rectangle with the given coordinates"
 
        

User login