Commit c5d85d5
committed
Improve error message failing to copy proc
Previously, when passing an unshareable proc to a Ractor we would get
the message:
'Ractor.new': allocator undefined for Proc (TypeError)
With this change we get:
'Ractor.new': can not copy unshareable object #<Proc:0x00007f1b31713600 test.rb:2> (Ractor::Error)
Which should hopefully be a little clearer about the problem and make it
simpler to debug.1 parent f1c2faf commit c5d85d5
3 files changed
Lines changed: 16 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
507 | 507 | | |
508 | 508 | | |
509 | 509 | | |
510 | | - | |
| 510 | + | |
511 | 511 | | |
512 | 512 | | |
513 | 513 | | |
514 | 514 | | |
515 | 515 | | |
516 | | - | |
517 | | - | |
| 516 | + | |
| 517 | + | |
518 | 518 | | |
519 | 519 | | |
520 | 520 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2075 | 2075 | | |
2076 | 2076 | | |
2077 | 2077 | | |
| 2078 | + | |
| 2079 | + | |
| 2080 | + | |
2078 | 2081 | | |
2079 | 2082 | | |
2080 | 2083 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
213 | 213 | | |
214 | 214 | | |
215 | 215 | | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
216 | 226 | | |
217 | 227 | | |
218 | 228 | | |
| |||
0 commit comments