mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
15 lines
243 B
Ruby
15 lines
243 B
Ruby
|
class Segfault
|
||
|
at_exit { Segfault.new.segfault }
|
||
|
|
||
|
define_method 'segfault' do
|
||
|
n = 11928
|
||
|
v = nil
|
||
|
i = 0
|
||
|
while i < n
|
||
|
i += 1
|
||
|
v = (foo rescue $!).local_variables
|
||
|
end
|
||
|
assert_equal(%i[i n v], v.sort)
|
||
|
end
|
||
|
end
|