This is a multi-part message in MIME format.

------extPart_000_0005_01C03302.69442A40
Content-Type: text/plain;
	charsetso-8859-1"
Content-Transfer-Encoding: quoted-printable

OK, here is what I think I know.

These three fragements differ only in that the last one defines a
private method, no?

class Object
  def foo
    ...
  end
end

def foo
  ...
end

def Object.foo
  ...
end

And isn't it true that a method like bar= must be called with a receiver?
Then why won't this work?

def bar=
  ...
end

self.bar = 5

It tells me that bar is private. Why? What is my fundamental misunderstanding?

Hal



------extPart_000_0005_01C03302.69442A40
Content-Type: text/html;
	charsetso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META content="MSHTML 5.00.2722.2800" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV>OK, here is what I think I know.</DIV>
<DIV>&nbsp;</DIV>
<DIV>These&nbsp;three fragements differ only in that the last one defines 
a</DIV>
<DIV>private method, no?</DIV>
<DIV>&nbsp;</DIV>
<DIV>class Object</DIV>
<DIV>&nbsp; def foo</DIV>
<DIV>&nbsp;&nbsp;&nbsp; ...</DIV>
<DIV>&nbsp; end</DIV>
<DIV>end</DIV>
<DIV>&nbsp;</DIV>
<DIV>def foo</DIV>
<DIV>&nbsp; ...</DIV>
<DIV>end</DIV>
<DIV>&nbsp;</DIV>
<DIV>def Object.foo</DIV>
<DIV>&nbsp; ...</DIV>
<DIV>end</DIV>
<DIV>&nbsp;</DIV>
<DIV>And isn't it true that a method like bar= must be called with a 
receiver?</DIV>
<DIV>Then why won't this work?</DIV>
<DIV>&nbsp;</DIV>
<DIV>def bar=</DIV>
<DIV>&nbsp; ...</DIV>
<DIV>end</DIV>
<DIV>&nbsp;</DIV>
<DIV>self.bar = 5</DIV>
<DIV>&nbsp;</DIV>
<DIV>It tells me that bar is private. Why? What is my fundamental 
misunderstanding?</DIV>
<DIV>&nbsp;</DIV>
<DIV>Hal</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV></BODY></HTML>

------extPart_000_0005_01C03302.69442A40--