[#4595] New block syntax — Daniel Amelang <daniel.amelang@...>

I'm really sorry if this isn't the place to talk about this. I've

25 messages 2005/03/21
[#4606] Re: New block syntax — "David A. Black" <dblack@...> 2005/03/21

Hi --

[#4629] Re: New block syntax — "Sean E. Russell" <ser@...> 2005/03/30

On Monday 21 March 2005 16:17, David A. Black wrote:

[#4648] about REXML::Encoding — speakillof <speakillof@...>

Hi.

15 messages 2005/03/31
[#4659] Re: about REXML::Encoding — "Sean E. Russell" <ser@...> 2005/04/04

On Thursday 31 March 2005 09:44, speakillof wrote:

Re: Allowing "?" in struct members

From: Florian Gro<florgro@...>
Date: 2005-03-17 16:53:04 UTC
List: ruby-core #4582
Yukihiro Matsumoto wrote:

> |So if this were to be implemented I think attr_accessor :foo? should 
> |create .foo? and .foo= -- and Struct.new(:foo?) then would also be similar.
> 
> No.  attr_accessor would not accept attributes with "?" in the name.
> If you want, you have to define your own "foo?".

Oh, "this" was not referring to the original poster here -- I was 
thinking that if you choose to allow getters with a "?" in the way I 
described then attr_accessor :foo? should probably create .foo? and 
.foo= and Struct.new() should probably be analogous. (And the accessor 
would in that case use @foo as the instance variable name, of course.)

But I don't know if you think doing that is worthwhile.

Sorry for the confusion.


In This Thread