Project

General

Profile

Actions

Bug #1508

closed

Recursive arrays with the same structure are not eql?.

Added by yugui (Yuki Sonoda) almost 15 years ago. Updated almost 13 years ago.

Status:
Closed
Assignee:
-
Target version:
ruby -v:
ruby 1.9.2dev (2009-05-24 trunk 23554) [i386-darwin9.7.0]
Backport:
[ruby-dev:38537]

Description

=begin
a = []
a << a

としたとき、 a と [a] は同じ構造を持っているのでeql?です。一方、a と [[a]] は同じ構造にもかかわらず eql? ではありません。
=end


Related issues 1 (0 open1 closed)

Is duplicate of Ruby master - Bug #1448: [patch] Proper handling of recursive arraysClosed05/09/2009Actions
Actions #1

Updated by ujihisa (Tatsuhiro Ujihisa) almost 15 years ago

=begin
本問題は http://redmine.ruby-lang.org/issues/show/1448 の部分問題です。

ただ、#1448の例が誤っているのか、

x = []; x << x
y = [[x]]
x == y # ==> true
y == x # ==> false, should be true!
の比較の結果が逆になってします。

パッチが与えられているものの、まだ適用はされていないみたいです。
=end

Actions #2

Updated by matz (Yukihiro Matsumoto) almost 15 years ago

  • Status changed from Open to Closed

=begin
#1448はなかださんによって適用されました。本件もcloseです
=end

Actions

Also available in: Atom PDF

Like0
Like0Like0