Project

General

Profile

Actions

Backport #7841

closed

Cyclic Module#prepend raises no exception while include does

Added by mame (Yusuke Endoh) about 11 years ago. Updated about 11 years ago.


Description

Hello,

module P; end
module Q; include P; end
module P; include Q; end
#=> cyclic include detected

module P; end
module Q; prepend P; end
module P; prepend Q; end
#=> no error

Is this intentional?

--
Yusuke Endoh

Updated by matz (Yukihiro Matsumoto) about 11 years ago

I think it should be detected.

Matz.

Actions #2

Updated by nobu (Nobuyoshi Nakada) about 11 years ago

  • % Done changed from 0 to 100
  • Status changed from Assigned to Closed

This issue was solved with changeset r39236.
Yusuke, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


class.c: cyclic prepend

  • class.c (include_modules_at): detect cyclic prepend with original
    method table. [ruby-core:52205] [Bug #7841]
Actions #3

Updated by nagachika (Tomoyuki Chikanaga) about 11 years ago

  • Tracker changed from Bug to Backport
  • Project changed from Ruby master to Backport200
  • Assignee changed from matz (Yukihiro Matsumoto) to nagachika (Tomoyuki Chikanaga)
  • Target version deleted (2.6)
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0