[#4522] Undefined Errno::EPROTO and the like raises NameError — "Florian Frank" <flori@...>
Hi,
[#4533] giving acces readline to rl_line_buffer — "Cs. Henk" <csaba-ml@...>
Hi!
[#4548] Ruby 1.8.2 array of hash entries functions incorrectly — noreply@...
Bugs item #1613, was opened at 2005-03-09 19:49
[#4561] rb_reg_quote weirdness — Nikolai Weibull <mailing-lists.ruby-core@...>
(Two weirdnesses in one day.)
Hi,
[#4567] Immutable Ropes — Nikolai Weibull <mailing-lists.ruby-core@...>
Note how I didn't write "Immutable Strings" in the subject.
[#4575] Allowing "?" in struct members — "Berger, Daniel" <Daniel.Berger@...>
Hi all,
[#4587] 0**0==1? — Bertram Scharpf <lists@...>
Hi,
[#4595] New block syntax — Daniel Amelang <daniel.amelang@...>
I'm really sorry if this isn't the place to talk about this. I've
Daniel Amelang wrote:
Hi --
On Monday 21 March 2005 16:17, David A. Black wrote:
Hi --
Hey David, I think that we've had some misunderstandings due to
Hi --
On Wednesday 30 March 2005 20:55, David A. Black wrote:
On Sunday 20 March 2005 21:31, Daniel Amelang wrote:
[#4601] Re: New block syntax — "Berger, Daniel" <Daniel.Berger@...>
> -----Original Message-----
[#4611] want_object? - possible? — "Berger, Daniel" <Daniel.Berger@...>
Hi all,
[#4619] Re: want_object? - possible? — Daniel Berger <djberg96@...>
--- nobu.nokada@softhome.net wrote:
Hi --
On 3/24/05, David A. Black <dblack@wobblini.net> wrote:
Hi --
On 4/14/05, David A. Black <dblack@wobblini.net> wrote:
On 14 Apr 2005, at 22:20, Mark Hubbart wrote:
On 4/15/05, Eric Hodel <drbrain@segment7.net> wrote:
[#4622] tempfile.rb — Tilman Sauerbeck <tilman@...>
Hi,
[#4648] about REXML::Encoding — speakillof <speakillof@...>
Hi.
On Thursday 31 March 2005 09:44, speakillof wrote:
Hi.
I've tested, applied, and committed your Encoding patch, Nobu.
Hi,
Re: want_object? - possible?
--- nobu.nokada@softhome.net wrote:
> Hi,
>
> At Wed, 23 Mar 2005 02:38:54 +0900,
> Berger, Daniel wrote in [ruby-core:04611]:
> > Would it be possible to add a want_object? method
> that checks calling
> > context? This would allow users to pass different
> values based on
> > calling contex, and would neatly solve the "what
> should bang methods
> > return" debate.
>
> I don't think it is absolutely impossible, but,
>
> > Here's some theoretical syntax:
> >
> > class String
> > def test!
> > if want_object?
> > return self
> > end
> > nil
> > end
> > end
> >
> > s = "hello"
> > s.test! # returns nil
> > s.test!.chop # self ("hello") is returned from
> test!
> >
> > result = s.test! # still returns nil
>
> Why nil? The return value seems to be used in the
> assignment?
But it's not being used as part of a method call, i.e.
it's not a receiver.
Please take a look at
http://search.cpan.org/~robin/Want-0.08/Want.pm for
more of an idea of what the Want module does.
Keep in mind that some of the contexts mentioned there
do not apply to Ruby, e.g. lvalue subs. In fact, most
may not. But, if there were some way for a method to
detect whether it's part of a chain in advance, that
might be useful.
Regards,
Dan
__________________________________
Do you Yahoo!?
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/