2013-03-25 00:43
hsbt_away changed the topic of #ruby-core to: check the latest release candidate for 1.9.1 release ftp.ruby-lang.org:/home/yugui/ruby-1.9.1-r26021+1.tar.bz2
00:03
kosaki2 has quit [Ping timeout: 256 seconds]
01:02
peta_ has quit [Quit: peta_]
01:44
Domon has joined #ruby-core
01:47
idkazuma has quit [Remote host closed the connection]
02:49
marcandre has joined #ruby-core
02:56
cout_ is now known as cout
02:57
cout is now known as cout_
02:58
cout_ is now known as cout
02:58
cout is now known as cout_
02:59
cout_ is now known as cout
03:40
kosaki2 has joined #ruby-core
03:58
Domon has quit [Read error: Connection reset by peer]
03:59
Domon has joined #ruby-core
04:31
idkazuma has joined #ruby-core
04:33
Domon has quit [Ping timeout: 264 seconds]
04:33
Domon has joined #ruby-core
04:42
Domon has quit [Remote host closed the connection]
04:57
tylersmith has quit [Remote host closed the connection]
05:17
Domon has joined #ruby-core
06:07
tylersmith has joined #ruby-core
06:10
idkazuma has quit [Remote host closed the connection]
06:10
tylersmith has quit [Read error: Operation timed out]
06:22
idkazuma has joined #ruby-core
06:22
marcandre has quit [Remote host closed the connection]
06:22
r0bgleeson has quit [Ping timeout: 272 seconds]
06:31
r0bgleeson has joined #ruby-core
06:48
vondruch has joined #ruby-core
06:50
judofyr has joined #ruby-core
06:51
shiba___ has quit [Ping timeout: 268 seconds]
06:53
kosaki2 has quit [Remote host closed the connection]
06:54
Domon_ has joined #ruby-core
06:54
Domon has quit [Ping timeout: 268 seconds]
07:06
r0bgleeson has quit [Ping timeout: 255 seconds]
08:05
idkazuma has quit [Remote host closed the connection]
09:14
peta_ has joined #ruby-core
10:35
charliesome has joined #ruby-core
10:41
shiba___ has joined #ruby-core
10:50
Domon_ has quit [Remote host closed the connection]
11:31
xibbar has joined #ruby-core
11:42
marcandre has joined #ruby-core
11:46
peta__ has joined #ruby-core
11:47
peta_ has quit [Read error: Connection reset by peer]
12:00
nagachika has joined #ruby-core
12:11
marcandre has quit [Remote host closed the connection]
12:12
marcandre has joined #ruby-core
12:26
r0bgleeson has joined #ruby-core
12:56
kosaki2 has joined #ruby-core
12:56
knu has quit [Remote host closed the connection]
12:58
xibbar has quit [Remote host closed the connection]
13:03
knu has joined #ruby-core
13:15
kosaki2 has quit [Remote host closed the connection]
13:57
ZachBeta has joined #ruby-core
14:04
kosaki2 has joined #ruby-core
14:22
kosaki2 has quit [Remote host closed the connection]
14:30
kosaki2 has joined #ruby-core
15:02
nagachika has quit [Remote host closed the connection]
15:09
vondruch has quit [Remote host closed the connection]
15:11
vondruch has joined #ruby-core
15:22
judofyr has quit [Remote host closed the connection]
15:35
tylersmith has joined #ruby-core
15:42
kosaki2 has quit [Remote host closed the connection]
15:55
tylersmith has quit [Remote host closed the connection]
16:00
headius has joined #ruby-core
16:19
vondruch has quit [Quit: Ex-Chat]
16:24
tmahoney has joined #ruby-core
16:38
tmahoney has quit [Ping timeout: 245 seconds]
16:52
tylersmith has joined #ruby-core
16:56
ZachBeta has quit [Ping timeout: 252 seconds]
16:59
ZachBeta has joined #ruby-core
17:06
tenderlove has quit [Remote host closed the connection]
17:11
tmahoney has joined #ruby-core
17:18
<
tmahoney >
How can I associate a non-Ruby pthread with a Ruby Thread?
17:42
heroux_ has quit [Ping timeout: 245 seconds]
17:44
heroux has joined #ruby-core
18:12
shiba___ has quit [Ping timeout: 256 seconds]
18:26
headius has quit [Quit: headius]
21:03
tenderlove has joined #ruby-core
21:06
buddhamagnet has joined #ruby-core
21:21
buddhamagnet has quit [Quit: leaving]
21:39
tmahoney has quit [Ping timeout: 245 seconds]
21:41
tmahoney_ has joined #ruby-core
21:42
<
tmahoney_ >
If I rb_raise within an rb_rescue, then the program crashes. Can I have the rb_rescue catch my manual rb_raises?
21:43
<
drbrain >
tmahoney_: that shouldn't crash
21:44
<
tmahoney_ >
Hmm. Let me make sure that's it.
21:45
<
drbrain >
I say this because you can begin; raise 'one'; rescue; raise 'two'; end
21:49
peta__ has quit [Ping timeout: 268 seconds]
21:51
<
tmahoney_ >
It turns out I'm using rb_exc_raise, but I don't think that makes a difference.
21:56
<
tmahoney_ >
Yeah, even if I use rb_raise, it'll crash. Let me see if a simple example does the same thing.
21:57
ZachBeta has quit [Quit: Computer has gone to sleep.]
21:57
<
drbrain >
I think rb_exc_raise is a wrapper around rb_raise
21:58
<
drbrain >
or vice versa
21:59
<
tmahoney_ >
Yeah, rb_raise calls rb_exc_raise.
22:00
tmahoney_ has quit [Read error: Connection reset by peer]
22:04
tmahoney has joined #ruby-core
22:05
<
tmahoney >
Yeah, this crashes
22:06
<
tmahoney >
In Ruby 2.0
22:08
<
drbrain >
I don't think that will work
22:08
<
drbrain >
a) ruby hasn't been set up
22:09
<
tmahoney >
Yeah actually that's not a complete example.
22:09
<
tmahoney >
But assuming it's been set up.
22:09
<
tmahoney >
rb_protect doesn't crash, but rb_rescue does.
22:09
<
drbrain >
b) I think you need to send a valid receiver
22:09
<
drbrain >
well, I suppose Qnil would still work
22:11
<
drbrain >
why does rescue() accept two arguments?
22:11
<
tmahoney >
It takes the first argument as data and the second argument as the exception.
22:12
<
tmahoney >
Data being whatever you pass to rb_rescue
22:12
<
tmahoney >
The last argument to rb_rescue.
22:12
<
drbrain >
I haven't used rb_rescue recently
22:13
<
tmahoney >
Maybe rb_rescue is meant to crash on manual rb_raises.
22:14
<
drbrain >
tmahoney: looking in numeric.c, coerce_rescue raises a TypeError
22:14
<
drbrain >
which is called from do_coerce
22:17
<
tmahoney >
Ah. Maybe it's the type of exception I'm raising.
22:18
<
tmahoney >
If I throw a TypeError instead of my current one, it gets caught correctly.
22:19
<
tmahoney >
Not if I throw a NotImpError.
22:21
tmahoney_ has joined #ruby-core
22:21
<
tmahoney_ >
My internet connection is having fun today.
22:22
<
tmahoney_ >
rb_rescue only catches subclasses of StandardError. If I use rb_rescue2, I can tell it to catch anything from Exception instead.
22:23
<
drbrain >
I didn't think to ask that
22:23
<
drbrain >
I'm sorry
22:23
<
drbrain >
… by "crashes" did you mean SEGV or "didn't rescue my exception"?
22:23
<
drbrain >
I thought SEGV
22:24
<
tmahoney_ >
Well both.
22:24
tmahoney has quit [Ping timeout: 272 seconds]
22:25
<
tmahoney_ >
Hey look, I left!
22:25
<
tmahoney_ >
Yeah, I got EXC_BAD_ACCESS, which means that my exception didn't get rescued (since the application is no longer alive)
22:28
<
tmahoney_ >
Cool, if I use rb_rescue2(..., rb_eException) instead of rb_rescue(...), then it's all good.
22:28
<
tmahoney_ >
Thanks, drbrain. You've been really helpful lately.
22:29
<
drbrain >
ok, so you were probably reaching the ruby top-level and blowing up
22:29
<
tmahoney_ >
Haha blowing up sounds about right.
22:29
<
drbrain >
an rb_rescue2 with rb_eException at top-level will help
22:47
idkazuma has joined #ruby-core
22:53
hsbt has quit [Ping timeout: 260 seconds]
23:06
hsbt has joined #ruby-core
23:14
nari_ has joined #ruby-core
23:24
nari_ has quit [Ping timeout: 248 seconds]
23:31
tenderlo_ has joined #ruby-core
23:32
tenderlove has quit [Ping timeout: 246 seconds]