Project

General

Profile

Actions

Bug #837

closed

異クラスの例外同士の比較でSystemStackError

Added by wanabe (_ wanabe) over 15 years ago. Updated almost 13 years ago.

Status:
Closed
Target version:
-
ruby -v:
Backport:
[ruby-dev:36796]

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

Actions #1

Updated by usa (Usaku NAKAMURA) over 15 years ago

  • Assignee set to ko1 (Koichi Sasada)

=begin

=end

Actions #2

Updated by matz (Yukihiro Matsumoto) over 15 years ago

  • Status changed from Open to Closed

=begin
fixed by r19856.
=end

Actions

Also available in: Atom PDF

Like0
Like0Like0