parent
a61c16ba42
commit
31905d9e23
Notes:
git
2025-01-06 18:18:44 +00:00
@ -8720,16 +8720,7 @@ pm_compile_node(rb_iseq_t *iseq, const pm_node_t *node, LINK_ANCHOR *const ret,
|
||||
const pm_ensure_node_t *cast = (const pm_ensure_node_t *) node;
|
||||
|
||||
if (cast->statements != NULL) {
|
||||
LABEL *start = NEW_LABEL(location.line);
|
||||
LABEL *end = NEW_LABEL(location.line);
|
||||
PUSH_LABEL(ret, start);
|
||||
|
||||
LABEL *prev_end_label = ISEQ_COMPILE_DATA(iseq)->end_label;
|
||||
ISEQ_COMPILE_DATA(iseq)->end_label = end;
|
||||
|
||||
PM_COMPILE((const pm_node_t *) cast->statements);
|
||||
ISEQ_COMPILE_DATA(iseq)->end_label = prev_end_label;
|
||||
PUSH_LABEL(ret, end);
|
||||
}
|
||||
|
||||
return;
|
||||
|
@ -1192,6 +1192,27 @@ a
|
||||
|
||||
res
|
||||
RUBY
|
||||
|
||||
# Bug #21001
|
||||
assert_prism_eval(<<~RUBY)
|
||||
RUN_ARRAY = [1,2]
|
||||
|
||||
MAP_PROC = Proc.new do |&blk|
|
||||
block_results = []
|
||||
RUN_ARRAY.each do |value|
|
||||
block_value = blk.call(value)
|
||||
block_results.push block_value
|
||||
end
|
||||
block_results
|
||||
ensure
|
||||
next block_results
|
||||
end
|
||||
|
||||
MAP_PROC.call do |value|
|
||||
break if value > 1
|
||||
next value
|
||||
end
|
||||
RUBY
|
||||
end
|
||||
|
||||
def test_NextNode
|
||||
|
Loading…
x
Reference in New Issue
Block a user