Backport #5234
closed`unexpected return' occurs when a proc is called in ensure
Description
Updated by ktsj (Kazuki Tsujimoto) over 13 years ago
The cause is Proc.new doesn't rewrite errinfo.
A following patch fixes this problem.
I'll commit it to trunk/ruby_1_9_3 later.
Updated by ktsj (Kazuki Tsujimoto) over 13 years ago
- Status changed from Open to Closed
- % Done changed from 0 to 100
This issue was solved with changeset r33096.
Koichi, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
-
proc.c (proc_new): force to rewrite errinfo when calling Proc.new in ensure.
[Bug #5234] [ruby-core:39125]
This code will be removed after changing throw mechanism (see r33064). -
vm.c (rb_vm_rewrite_dfp_in_errinfo): new function.
-
vm.c (vm_make_env_each): changed accordingly.
-
vm_core.h: ditto.
-
bootstraptest/test_flow.rb: add tests for above.
Updated by andhapp (Anuj Dutta) over 13 years ago
Same issue occurs on 1.9.2-p290. Can this be backported to it as well?
Thanks.
Updated by ktsj (Kazuki Tsujimoto) over 13 years ago
- Tracker changed from Bug to Backport
- Status changed from Closed to Assigned
- Assignee changed from ko1 (Koichi Sasada) to yugui (Yuki Sonoda)
Yugui-san:
Could you consider backporting the fix?
Updated by ktsj (Kazuki Tsujimoto) over 13 years ago
- Target version changed from 1.9.3 to 1.9.2
Updated by kosaki (Motohiro KOSAKI) over 13 years ago
- Project changed from Ruby master to Backport192
- Category changed from core to core
- Target version deleted (
1.9.2)
Updated by naruse (Yui NARUSE) over 8 years ago
- Status changed from Assigned to Rejected