diff options
| author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-07-01 07:09:53 +0000 |
|---|---|---|
| committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-07-01 07:09:53 +0000 |
| commit | 3948410b044b80da78d27c622a419d4973a6d8b3 (patch) | |
| tree | 792cb4cc33bc3a4b34c7aba5b4185211fc9f007f /test | |
| parent | b8d684d9e2cfb7e4744fa3c2c283007ce26bd7a0 (diff) | |
* test/ruby/test_proc.rb (test_return_from_proc): test for [ruby-core:24097].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@23923 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
| -rw-r--r-- | test/ruby/test_proc.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/ruby/test_proc.rb b/test/ruby/test_proc.rb index 5436879041..c0a4e2268c 100644 --- a/test/ruby/test_proc.rb +++ b/test/ruby/test_proc.rb @@ -101,4 +101,11 @@ class TestProc < Test::Unit::TestCase c.new.x(nil) assert_equal(2, a, '[ruby-core:23050]') end + + def given_block(&b) b end + def test_return_from_proc + a_proc = eval("Proc.new { return }", TOPLEVEL_BINDING) + res = given_block(&a_proc) + assert_raise(LocalJumpError, '[ruby-core:24097]') {res.call} + end end |
