[#7872] Nonblocking socket-connect — "Francis Cianfrocca" <garbagecat10@...>

All, I needed a nonblocking socket connect for my asynchronous-event

18 messages 2006/05/14
[#7873] Re: Nonblocking socket-connect — Tanaka Akira <akr@...17n.org> 2006/05/14

In article <3a94cf510605140559l7baa0205le341dac4f47d424b@mail.gmail.com>,

[#7874] Re: Nonblocking socket-connect — "Francis Cianfrocca" <garbagecat10@...> 2006/05/15

How about introducing the method Socket#set_nonblocking, or alternatively

[#7875] Re: Nonblocking socket-connect — Yukihiro Matsumoto <matz@...> 2006/05/15

Hi,

[#7876] Re: Nonblocking socket-connect — "Francis Cianfrocca" <garbagecat10@...> 2006/05/15

Well, it's ok then. I'm comfortable adding in the nonblocking

[#7877] Re: Nonblocking socket-connect — Yukihiro Matsumoto <matz@...> 2006/05/15

Hi,

[ ruby-Bugs-4498 ] raise can create custom exception objects which aren't properly initialized

From: noreply@...
Date: 2006-05-17 11:37:10 UTC
List: ruby-core #7891
Bugs item #4498, was opened at 2006-05-17 11:36
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=1698&aid=4498&group_id=426

Category: Core
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Sylvain Joyeux (lapinot)
Assigned to: Nobody (None)
Summary: raise can create custom exception objects which aren't properly initialized

Initial Comment:
If one defines a custom exception type with a initialize() that needs argument:

class MyError &lt; RuntimeError
  def initalize(info)
    @info = info
  end
end



then Ruby allows to raise an exception *without creating the object yourself*
  raise MyError, &quot;this is an error message&quot;

which is obviously wrong, since the MyError object created by raise won't be properly initialized. IMO, the explicit call to ::new should be the rule here, i.e.
  raise MyError.new(info), &quot;this is an error message&quot;

In fact, I'd expect 
  raise klass, message
to behave as
  raise klass.new, message
which is not the case

----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=1698&aid=4498&group_id=426

In This Thread

Prev Next