summaryrefslogtreecommitdiff
path: root/bootstraptest
diff options
context:
space:
mode:
authorktsj <ktsj@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-08-27 10:14:29 +0000
committerktsj <ktsj@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-08-27 10:14:29 +0000
commit3bffb317d69977f3da4b384913740f30995e6725 (patch)
tree0be245e3baad2cd691cb0a755614a5efe0693363 /bootstraptest
parent9754ed4885b6f54f73200208087f83476da0c78a (diff)
* backport r33096 from trunk.
* proc.c (proc_new): force to rewrite errinfo when calling Proc.new in ensure. [Bug #5234] [ruby-core:39125] * 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/branches/ruby_1_9_3@33098 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bootstraptest')
-rw-r--r--bootstraptest/test_flow.rb13
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