ko1 7d8a415bc2 check break target correctly.
* compile.c (iseq_compile_each0): save target child_iseq in the catch-table
  for break. This iseq is not for continuation, but for search key at
  vm_throw_start().

* vm_insnhelper.c (vm_throw_start): check saved iseq first.

* iseq.h: add comment for it.

* test/ruby/test_iterator.rb (test_ljump): add a test for the issue:
    def call b; b.call; end
    call(Proc.new{break}){} #=> (1) should raise LocalJumpError
    call(Proc.new{break})   #=> (2) shoudd raies LocalJumpError, too.
  but (1) doesn't raise LocalJumpError.

  This issue is reported by Matz.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59043 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-08 04:13:51 +00:00
..
2017-05-18 15:13:30 +00:00
2017-04-25 19:13:26 +00:00
2017-04-07 13:26:12 +00:00
2017-05-24 13:30:54 +00:00
2017-02-24 07:39:37 +00:00
2017-03-14 15:14:21 +00:00
2017-06-08 04:13:51 +00:00
2017-05-15 07:02:33 +00:00
2017-03-21 03:15:57 +00:00
2017-04-25 09:23:04 +00:00
2017-05-01 02:01:38 +00:00