Project

General

Profile

ActionsLike0

Bug #21446

open

StackOverflow when changing visibility in reopened refinement

Added by luke-gru (Luke Gruber) 2 months ago. Updated 2 months ago.

Status:
Open
Assignee:
-
Target version:
-
[ruby-core:122558]

Description

class A
  def a
    :a
  end
end
class B < A
end

module R
  refine B do
    private :a
  end
end
module R
  refine B do
    public :a
  end
end
using R
B.new.a # StackOverflow

I would expect it to change the visibility, not to overflow the stack.

Updated by nobu (Nobuyoshi Nakada) 2 months ago

It does not seem to need to reopen the refinement.

Reproduces just by changing visibility twice.

module R
  refine B do
    private :a
    public :a
  end
end
ActionsLike0

Also available in: Atom PDF