Skip to content

NoMethodError in case of calling private method has a slighly different message #1957

@deepj

Description

@deepj

Due to this difference some Hanami::Model specs fail. It mainly expects #<User:....

TruffleRuby:

private method `attributes' called for User (NoMethodError)

MRI:

private method `attributes' called for #<User:0x00007faf660934c8 @attributes={}> (NoMethodError)

To reproduce:

class User
  def initialize(**params)
    @attributes = params
  end

  private

  attr_reader :attributes
end

p User.new.attributes

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions