[#1094] Re: [ruby-cvs] ruby, ruby/lib: * eval.c (ev_const_defined, ev_const_get), variable.c — Dave Thomas <dave@...>

> * eval.c (rb_mod_autoload, rb_mod_autoload_p): new method;

12 messages 2003/05/29
[#1095] Re: [ruby-cvs] ruby, ruby/lib: * eval.c (ev_const_defined, ev_const_get), variable.c — nobu.nokada@... 2003/05/29

Hi,

Re: ping.rb

From: Dave Thomas <dave@...>
Date: 2003-05-15 03:26:57 UTC
List: ruby-core #1040
Ryan Davis wrote:

>> On my Mac OSX,
>>
>>    TCPSocket.new('localhost', 'echo')
> 
>> raises EINVAL:
>>
>> This breaks ping.rb, which seems to assume it will be seeing 
>> ECONNREFUSED. This means that pingecho('localhost') returns false on 
>> my box.
>>
> 
> I think this is valid per default mac os x setup:
> 
> <497> telnet localhost echo
> Trying ::1...
> telnet: connect to address ::1: Connection refused
> Trying 127.0.0.1...
> telnet: connect to address 127.0.0.1: Connection refused
> telnet: Unable to connect to remote host

Yes - but 'connection refused' should generate ECONNREFUSED, which is 
handled specially inside ping.rb. Instead it seems to be generating EINVAL.

Cheers


Dave



In This Thread