[#7978] Patch for Unix socket peer credentials — "James F. Hranicky" <jfh@...>

This patch adds support for getting the uid and gid of the peer

27 messages 2006/06/09
[#8004] Re: Patch for Unix socket peer credentials — Tanaka Akira <akr@...17n.org> 2006/06/16

In article <200606091528.30171.jfh@cise.ufl.edu>,

[#8005] Re: Patch for Unix socket peer credentials — "James F. Hranicky" <jfh@...> 2006/06/16

On Friday 16 June 2006 11:51, Tanaka Akira wrote:

[#8010] Re: Patch for Unix socket peer credentials — Tanaka Akira <akr@...17n.org> 2006/06/17

In article <200606161327.35948.jfh@cise.ufl.edu>,

[#8191] Re: Patch for Unix socket peer credentials — "James F. Hranicky" <jfh@...> 2006/07/10

On Saturday 17 June 2006 06:27, Tanaka Akira wrote:

[#8193] Re: Patch for Unix socket peer credentials — Tanaka Akira <akr@...> 2006/07/11

In article <200607101352.16804.jfh@cise.ufl.edu>,

[#8212] Re: Patch for Unix socket peer credentials — "James F. Hranicky" <jfh@...> 2006/07/13

On Tuesday 11 July 2006 00:10, Tanaka Akira wrote:

[#8217] Re: Patch for Unix socket peer credentials — nobu@... 2006/07/14

Hi,

[#8257] Re: Patch for Unix socket peer credentials — "James F. Hranicky" <jfh@...> 2006/07/18

On Thursday 13 July 2006 22:48, nobu@ruby-lang.org wrote:

[#8258] Re: Patch for Unix socket peer credentials — Eric Hodel <drbrain@...7.net> 2006/07/18

On Jul 18, 2006, at 12:27 PM, James F. Hranicky wrote:

[#8073] 1.8.5p1 build failure on Solaris 10 — "Daniel Berger" <Daniel.Berger@...>

Solaris 10

23 messages 2006/06/27
[#8074] Re: 1.8.5p1 build failure on Solaris 10 — Yukihiro Matsumoto <matz@...> 2006/06/28

Hi,

[#8078] Re: 1.8.5p1 build failure on Solaris 10 — "Daniel Berger" <Daniel.Berger@...> 2006/06/28

Yukihiro Matsumoto wrote:

[#8079] Re: 1.8.5p1 build failure on Solaris 10 — ts <decoux@...> 2006/06/28

>>>>> "D" == Daniel Berger <Daniel.Berger@qwest.com> writes:

[#8096] Re: 1.8.5p1 build failure on Solaris 10 — ville.mattila@... 2006/06/29

ts <decoux@moulon.inra.fr> wrote on 28.06.2006 17:37:00:

Array.to_hash

From: Nitay <nitayj@...>
Date: 2006-06-05 19:12:56 UTC
List: ruby-core #7946
Hi guys,

I have come across this a couple of times now and was wondering if there is
an easy way to accomplish what I am trying to do. I have an Nx2 array, where
the first and last items can themselves be arrays (or anything, really), and
would like to create a hash out of it where n[0] => n[1] for all n in N. The
solution I usually use is something to the effect of:

h = {}
N.each { h[N.first] = N.last }

I find it a bit annoying that this has to take two lines though, especially
since this means I can't easily make h a constant, for instance. The best
method I have found so far to do this in one line is something to the effect
of:

Hash[*N]

but this destroys the requirement of N's being more complicated than single,
simple items, and is not, in my opinion, particularly readable/pretty.

My suggestion, if no other nice/easy alternative exists, is a method like:

N.to_hash

This method would throw an error if the array is not Nx2, otherwise would
return the hash I have just mentioned. This should be an easy to write, and
I'd be happy to do it. In fact if I can remember which project it was and
find it in my files, I should already have this written.

Forgive me, but I'm new to this ruby-core list (first post! :)), so I am not
intimately familiar yet with the ticketing, requests, patches, etc process
you use.

Thanks,

- Nitay.

In This Thread

Prev Next