F
Fitzgerald,Greg
------_=_NextPart_001_01C479A4.87C345E3
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Is this a bug?
def myProp=3D (var)
@var =3D var
end
def myProp
@var
end
myProp =3D "local"
myProp # =3D> "local"
self.myProp # =3D> nil
self.myProp =3D "works"
myProp # =3D> "local"
self.myProp # =3D> "works"
Whereas, I'd expect:
myProp =3D "hello"
myProp # =3D> "hello"
self.myProp # =3D> "hello"
Shouldn't the interpreter try to call the 'myProp' function before going
and creating a new 'myProp' local variable?
-Greg
CONFIDENTIALITY NOTICE
This message and any included attachments
are from Cerner Corporation and are intended
only for the addressee. The information
contained in this message is confidential and
may constitute inside or non-public information
under international, federal, or state
securities laws. Unauthorized forwarding,
printing, copying, distribution, or use of such
information is strictly prohibited and may be
unlawful. If you are not the addressee, please
promptly delete this message and notify the
sender of the delivery error by e-mail or you
may call Cerner's corporate offices in Kansas
City, Missouri, U.S.A at (+1) (816)221-1024.
---------------------------------------- --
------_=_NextPart_001_01C479A4.87C345E3--
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Is this a bug?
def myProp=3D (var)
@var =3D var
end
def myProp
@var
end
myProp =3D "local"
myProp # =3D> "local"
self.myProp # =3D> nil
self.myProp =3D "works"
myProp # =3D> "local"
self.myProp # =3D> "works"
Whereas, I'd expect:
myProp =3D "hello"
myProp # =3D> "hello"
self.myProp # =3D> "hello"
Shouldn't the interpreter try to call the 'myProp' function before going
and creating a new 'myProp' local variable?
-Greg
CONFIDENTIALITY NOTICE
This message and any included attachments
are from Cerner Corporation and are intended
only for the addressee. The information
contained in this message is confidential and
may constitute inside or non-public information
under international, federal, or state
securities laws. Unauthorized forwarding,
printing, copying, distribution, or use of such
information is strictly prohibited and may be
unlawful. If you are not the addressee, please
promptly delete this message and notify the
sender of the delivery error by e-mail or you
may call Cerner's corporate offices in Kansas
City, Missouri, U.S.A at (+1) (816)221-1024.
---------------------------------------- --
------_=_NextPart_001_01C479A4.87C345E3--