[#4654] signleton_methods / methods / public_methods - weirdness? — Johan Holmberg <holmberg@...>
[#4666] Getting a hex representation for a Numeric — "Zev Blut" <rubyzbibd@...>
Hello,
[#4670] ruby 1.8.3 preview1 plan — Yukihiro Matsumoto <matz@...>
Hi,
[#4690] test failures for stable-snapshot 09/04/2005 — noreply@...
Bugs item #1762, was opened at 10-04-2005 20:46
Hello.
[#4709] BNF-like grammar specified DIRECTLY in Ruby — Eric Mahurin <eric_mahurin@...>
Hello everybody,
[#4712] Segfault in zlib? — Nathaniel Talbott <ntalbott@...>
I'm using rubyzip (latest gem version) and zlib (1.2.2) to do a bunch
[#4736] Trivial speedup in Array#zip — Mauricio Fern疣dez <batsman.geo@...>
[#4745] Win32: Ruby & APR; build problems for Ruby Subversion SWIG bindings — Erik Huelsmann <ehuels@...>
Having taken upon me the task to provide a Windows build for
On 4/20/05, Erik Huelsmann <ehuels@gmail.com> wrote:
Hi Austin,
Hi,
On 4/24/05, nobu.nokada@softhome.net <nobu.nokada@softhome.net> wrote:
Hi,
> > > Ruby is just using AC_TYPE_UID_T. So, using typedef for them,
Hi,
On 4/26/05, nobu.nokada@softhome.net <nobu.nokada@softhome.net> wrote:
As promised, I attached a patch to eliminate the compile problems
Hi,
Thanks for the quick response!
Hi,
On 5/14/05, nobu.nokada@softhome.net <nobu.nokada@softhome.net> wrote:
[#4751] Illegal regexp causes segfault — Andrew Walrond <andrew@...>
irb(main):058:0> a = /\[([^]]*)\]/
Andrew Walrond, April 22:
In article <200504221210.38231.andrew@walrond.org>,
>>>>> "T" == Tanaka Akira <akr@m17n.org> writes:
[#4774] enhanced $0 modification — Evan Webb <evanwebb@...>
The attached patch allows for ruby to use more of the available stack
Hi,
[#4775] profiler.rb Schroedinbug — C Erler <erlercw@...>
A ruby program with the single instruction "require 'profile'"
>A ruby program with the single instruction "require 'profile'"
[#4807] Re: -Wall — Vincent Isambart <vincent.isambart@...>
> Why does ruby build without -Wall in CFLAGS by default? -Wall can help to
[#4815] Re: -Wall — nobu.nokada@...
Hi,
Re: want_object? - possible?
On 3/24/05, David A. Black <dblack@wobblini.net> wrote:
> Hi --
>
> On Fri, 25 Mar 2005, Daniel Berger wrote:
>
> > 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.
>
> I don't think there is a way, logically, within the basic
> message-receiver-response model. The idea of an object knowing what
> is going to happen after it finishes responding to the message seems,
> to me, to be part of a pretty deeply different design. At that point,
> also, you're not really chaining method calls; you're using
> method-chaining syntax to execute something that's really not linear
> from left to right. At that point, the a.b.c syntax starts to obscure
> what's really happening, rather than revealing it, I think.
There are occasions where a nice uses_return_value? would help:
module Enumerable
def zip(*others)
if block_given?
if uses_return_value?
# build a new array using the block, return it
else
# yield each set of elements, don't build array.
end
[...]
and using it with method chaining:
(1..26).zip('a'..'z'){|n,c| n.to_s + c}.map{|v| #do stuff here}
Looks good to me!
The main argument (in a recent ruby-talk discussion) against having
zip+block return an array was based on performance issues. If we had a
way to determine whether the caller needs a return value, that could
be avoided. I would see this method mainly as an optimization tool, if
it was added.
Note: I'm not advocating the change, I'm just pointing out some useful
possibilities. I'm not going to pretend to know the best design for
Ruby; I'll happily leave that to Matz, who's done awfully well so far
:)
cheers,
Mark