diff options
author | ktsj <ktsj@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-08-27 09:59:48 +0000 |
---|---|---|
committer | ktsj <ktsj@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-08-27 09:59:48 +0000 |
commit | a09e7139a3916c832f42d54191fc69439ecc603e (patch) | |
tree | e39f5a3b956ea5aa78e0925baa504c1a8da64470 /bootstraptest/test_flow.rb | |
parent | 7412263eba30c0c65ae72f4e9dc0d139f37f4d00 (diff) |
* 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.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33096 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bootstraptest/test_flow.rb')
-rw-r--r-- | bootstraptest/test_flow.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/bootstraptest/test_flow.rb b/bootstraptest/test_flow.rb index 100ad0a2f1..d40d814fbc 100644 --- a/bootstraptest/test_flow.rb +++ b/bootstraptest/test_flow.rb @@ -530,6 +530,19 @@ assert_equal %Q{ENSURE\n}, %q{ end end e = Bug2729.new +}], + ['[ruby-core:39125]', %q{ + class Bug5234 + include Enumerable + def each + begin + yield :foo + ensure + proc + end + end + end + e = Bug5234.new }]].each do |bug, src| assert_equal "foo", src + %q{e.detect {true}}, bug assert_equal "true", src + %q{e.any? {true}}, bug |