summaryrefslogtreecommitdiff
path: root/test/-ext-/iseq_load
diff options
context:
space:
mode:
Diffstat (limited to 'test/-ext-/iseq_load')
-rw-r--r--test/-ext-/iseq_load/test_iseq_load.rb24
1 files changed, 18 insertions, 6 deletions
diff --git a/test/-ext-/iseq_load/test_iseq_load.rb b/test/-ext-/iseq_load/test_iseq_load.rb
index 5bbd49efba..7251603b0a 100644
--- a/test/-ext-/iseq_load/test_iseq_load.rb
+++ b/test/-ext-/iseq_load/test_iseq_load.rb
@@ -52,16 +52,21 @@ class TestIseqLoad < Test::Unit::TestCase
end
def test_next_in_block_in_block
- skip "failing due to stack_max mismatch"
- assert_iseq_roundtrip <<-'end;'
- 3.times { 3.times { next } }
+ @next_broke = false
+ src = <<-'end;'
+ 3.times { 3.times { next; @next_broke = true } }
end;
+ a = ISeq.compile(src).to_a
+ iseq = ISeq.iseq_load(a)
+ iseq.eval
+ assert_equal false, @next_broke
+ skip "failing due to stack_max mismatch"
+ assert_iseq_roundtrip(src)
end
def test_break_ensure
- skip "failing due to exception entry sp mismatch"
- assert_iseq_roundtrip <<-'end;'
- def m
+ src = <<-'end;'
+ def test_break_ensure_def_method
bad = true
while true
begin
@@ -70,8 +75,15 @@ class TestIseqLoad < Test::Unit::TestCase
bad = false
end
end
+ bad
end
end;
+ a = ISeq.compile(src).to_a
+ iseq = ISeq.iseq_load(a)
+ iseq.eval
+ assert_equal false, test_break_ensure_def_method
+ skip "failing due to exception entry sp mismatch"
+ assert_iseq_roundtrip(src)
end
# FIXME: still failing