[#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

24 messages 2005/04/20
[#4746] Re: Win32: Ruby & APR; build problems for Ruby Subversion SWIG bindings — Austin Ziegler <halostatue@...> 2005/04/20

On 4/20/05, Erik Huelsmann <ehuels@gmail.com> wrote:

[#4747] Re: Win32: Ruby & APR; build problems for Ruby Subversion SWIG bindings — Erik Huelsmann <ehuels@...> 2005/04/20

Hi Austin,

[#4762] Re: Win32: Ruby & APR; build problems for Ruby Subversion SWIG bindings — nobu.nokada@... 2005/04/24

Hi,

[#4783] Re: Win32: Ruby & APR; build problems for Ruby Subversion SWIG bindings — Erik Huelsmann <ehuels@...> 2005/04/25

On 4/24/05, nobu.nokada@softhome.net <nobu.nokada@softhome.net> wrote:

[#4787] Re: Win32: Ruby & APR; build problems for Ruby Subversion SWIG bindings — nobu.nokada@... 2005/04/25

Hi,

[#4794] Re: Win32: Ruby & APR; build problems for Ruby Subversion SWIG bindings — Erik Huelsmann <ehuels@...> 2005/04/25

> > > Ruby is just using AC_TYPE_UID_T. So, using typedef for them,

[#4751] Illegal regexp causes segfault — Andrew Walrond <andrew@...>

irb(main):058:0> a = /\[([^]]*)\]/

13 messages 2005/04/22

Re: [PATCH] Trivial speedup in Array#zip

From: "daz" <dooby@...10.karoo.co.uk>
Date: 2005-04-19 20:36:05 UTC
List: ruby-core #4738
From: "Mauricio Fern疣dez"
>
> [...] there's no reason to keep AFAIK.
>

Support here :-)
(I tried hard to bust it apart visually).

Seems it would still give correct nils when array lengths differ.

%w{A B C D E}.zip([1,2,3]) {|ra| p ra}

#-> ["A", 1]
#-> ["B", 2]
#-> ["C", 3]
#-> ["D", nil]
#-> ["E", nil]


Compulsive tidiness would lead me to set:

    long len = RARRAY(ary)->len;

as the declaration and use that in the same way as the non-block
version (removing the assignment, there).

Gosh - and then that "array assurance" loop at the top could, so easily,
be "enhanced" to:

    for (i=0; i<argc; i++) {
        argv[i] = to_ary(argv[i]);
        if (len < RARRAY(argv[i])->len)
            len = RARRAY(argv[i])->len;    /* set for longest array */
    }

so that:

['A'].zip([1,2,3]) {|ra| p ra}

instead of stopping at:

  #-> ["A", 1]

would result in:

  #-> ["A", 1]
  #-> [nil, 2]
  #-> [nil, 3]

But that would be a change in behaviour and has probably been
discussed - and discarded - elsewhere.


daz





In This Thread