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

Re: Undefined Errno::EPROTO and the like raises NameError

From: Yukihiro Matsumoto <matz@...>
Date: 2005-03-08 01:14:56 UTC
List: ruby-core #4525
Hi,

In message "Re: Undefined Errno::EPROTO and the like raises NameError"
    on Tue, 8 Mar 2005 10:03:16 +0900, Yukihiro Matsumoto <matz@ruby-lang.org> writes:

||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
|
|Yeah, it's on my to-do list for a long time, but without any idea to
|solve.  Errno exceptions vary platform to platform, so that simple
|scripts like you did cause NameError, but I don't want to allow
|reference to undefined constants in the rescue clause, since relaxing
|constant reference here changes the meaning of expression, and makes
|semantics more complex.  Any idea?

I got an idea right after sending above mail.  Than you Florian for
the source of inspiration.  The following code will stop your problem.

  class Errno::NOERROR
  end

  def Errno.const_missing(name)
    Errno::NOERROR
  end

I will merge this to 1.9 and see how good it works.

							matz.

In This Thread