Actions
Bug #837
closed異クラスの例外同士の比較でSystemStackError
Description
=begin
ワナベと申します。
1.9 でクラスの異なる例外オブジェクトを比較すると
exc_equal で循環してしまい SystemStackError になってしまいます。
$ ruby -ve 'Exception.new == RuntimeError.new'
ruby 1.9.0 (2008-10-20 revision 19851) [i386-mingw32]
-e:1: warning: useless use of == in void context
-e:1:in ==': stack level too deep (SystemStackError) from -e:1:in
=='
from -e:1:in ==' from -e:1:in
=='
from -e:1:in ==' from -e:1:in
=='
from -e:1:in ==' from -e:1:in
=='
from -e:1:in ==' ... 6144 levels... from -e:1:in
=='
from -e:1:in ==' from -e:1:in
=='
from -e:1:in `'
また、Exception.new == 1 や Exception.new == 1.0 などでも
SystemStackError になります。
--
ワナベ
=end
Updated by matz (Yukihiro Matsumoto) over 15 years ago
- Status changed from Open to Closed
=begin
fixed by r19856.
=end
Actions
Like0
Like0Like0