Project

General

Profile

Actions

Bug #11867

closed

overriden constant instance variable mismatch

Added by dingoegret (dingo egret) over 8 years ago. Updated almost 5 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.2.0p0 (2014-12-25 revision 49005) [x86_64-darwin14]
[ruby-core:72455]

Description

A = Struct.new(:a)

A.new(1)
#<struct A a=1>

class A
  def initialize(b)
    @b = b
  end
end

A.new(1)
#<struct A a=nil>

Is this expected?

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0