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

Undefined Errno::EPROTO and the like raises NameError

From: "Florian Frank" <flori@...>
Date: 2005-03-07 16:17:37 UTC
List: ruby-core #4522
Hi,

I just run into the problem, that certain System Call Errors aren't 
defined depending on the platform. I tested on a platform, where 
Errno::EPROTO is not defined. If I code something like

begin
#...
rescue Errno::Foo, Errno::Bar, Errno::EPROTO
#...
rescue Errno::Baz
end

a NameError "uninitialized constant Errno::EPROTO" is raised. So, it's 
not possible to write platform agnostically rescue cases.

EPROTO is set like this:

#ifdef EPROTO
    set_syserr(EPROTO, "EPROTO");
#endif

Perhaps it would be a good idea, to at least set the not defined errors 
(which Ruby checks for) to nil, to avoid the raised NameErrors?

-- 
Florian Frank


In This Thread

Prev Next