aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_exception.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-06-29 04:01:30 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-06-29 04:01:30 +0000
commit0a11abfc7ec92fcf4eb9e973c68588f079fdb60d (patch)
tree131606bcfc545598f8c21ad5c4d046837f2e85d0 /test/ruby/test_exception.rb
parentf73498196fcb48a322c05d8df790952d1a46c72b (diff)
downloadruby-0a11abfc7ec92fcf4eb9e973c68588f079fdb60d.tar.gz
compile.c: disallow next in once
* compile.c (iseq_compile_each0): turned dregx context in "once" into "guarded" type from "block" type, to disallow `next`, `break`, `redo` as well as outside "once". [ruby-core:81805] [Bug #13690] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59202 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_exception.rb')
-rw-r--r--test/ruby/test_exception.rb11
1 files changed, 0 insertions, 11 deletions
diff --git a/test/ruby/test_exception.rb b/test/ruby/test_exception.rb
index ecbf042e49..6955118de7 100644
--- a/test/ruby/test_exception.rb
+++ b/test/ruby/test_exception.rb
@@ -1080,15 +1080,4 @@ $stderr = $stdout; raise "\x82\xa0"') do |outs, errs, status|
}
end;
end
-
- def test_break_in_once
- assert_separately([], "#{<<-"begin;"}\n#{<<~'end;'}")
- begin;
- obj = Object.new
- def obj.try
- /#{break}/o
- end
- assert_raise(LocalJumpError, /proc-closure/) {obj.try}
- end;
- end
end