Project

General

Profile

Actions

Bug #8166

closed

Since r39628 rspec-mock's and_call_original fail with SystemStackError

Added by nagachika (Tomoyuki Chikanaga) over 11 years ago. Updated over 11 years ago.

Status:
Rejected
Target version:
ruby -v:
ruby 2.1.0dev (2013-03-24 trunk 39908) [x86_64-darwin10.8.0]
Backport:
[ruby-core:53740]

Description

Hello,

By r39628 [Feature 8035], Module#ancestors for a singleton class contains singleton class itself.
It introduce a compatibility problem with rspec-mock's RSpec::Mocks::MessageExpectation#and_call_original.

and_call_original uses Module#ancestors to find the original method overridden by a singleton method. Because ancestors contains singleton class itself, `original_method' return stub method and fall into infinite recursive call.

I think hiding singleton class from ancestors is better even when a modules is pretended.


Related issues 1 (0 open1 closed)

Related to Ruby master - Feature #8035: singleton class should be included in ancestorsClosedmatz (Yukihiro Matsumoto)03/07/2013Actions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0