Skip to content

Commit 3a06b3d

Browse files
committed
Revert "merge revision(s) ff222ac: [Backport #21370]"
This reverts commit acb19e8.
1 parent e68adac commit 3a06b3d

File tree

2 files changed

+0
-26
lines changed

2 files changed

+0
-26
lines changed

compile.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13234,13 +13234,6 @@ outer_variable_cmp(const void *a, const void *b, void *arg)
1323413234
{
1323513235
const struct outer_variable_pair *ap = (const struct outer_variable_pair *)a;
1323613236
const struct outer_variable_pair *bp = (const struct outer_variable_pair *)b;
13237-
13238-
if (!ap->name) {
13239-
return -1;
13240-
} else if (!bp->name) {
13241-
return 1;
13242-
}
13243-
1324413237
return rb_str_cmp(ap->name, bp->name);
1324513238
}
1324613239

test/ruby/test_iseq.rb

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -905,25 +905,6 @@ def test_unreachable_next_in_block
905905
end
906906
end
907907

908-
def test_serialize_anonymous_outer_variables
909-
iseq = RubyVM::InstructionSequence.compile(<<~'RUBY')
910-
obj = Object.new
911-
def obj.test
912-
[1].each do
913-
raise "Oops"
914-
rescue
915-
return it
916-
end
917-
end
918-
obj
919-
RUBY
920-
921-
binary = iseq.to_binary # [Bug # 21370]
922-
roundtripped_iseq = RubyVM::InstructionSequence.load_from_binary(binary)
923-
object = roundtripped_iseq.eval
924-
assert_equal 1, object.test
925-
end
926-
927908
def test_loading_kwargs_memory_leak
928909
assert_no_memory_leak([], "#{<<~"begin;"}", "#{<<~'end;'}", rss: true)
929910
a = RubyVM::InstructionSequence.compile("foo(bar: :baz)").to_binary

0 commit comments

Comments
 (0)