mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* iseq.h: iseq_catch_table_entry::catch_type should be
Fixnum because they are pushed into Array in a compiler. [Bug #7502] * test/ruby/test_objectspace.rb: add a test of this issue. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38156 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
17a2be29b9
commit
c4f9dd2626
3 changed files with 27 additions and 6 deletions
|
@ -65,4 +65,17 @@ End
|
|||
END
|
||||
assert_raise(ArgumentError) { ObjectSpace.define_finalizer([], Object.new) }
|
||||
end
|
||||
|
||||
def test_each_object
|
||||
GC.disable
|
||||
eval('begin; 1.times{}; rescue; ensure; end')
|
||||
arys = []
|
||||
ObjectSpace.each_object(Array){|ary|
|
||||
arys << ary
|
||||
}
|
||||
GC.enable
|
||||
arys.each{|ary|
|
||||
assert_equal(String, ary.inspect.class) # should not cause SEGV
|
||||
}
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue