This forum is now read-only. Please use our new forums! Go to forums

banner
Close banner
0 points
Submitted by Nicole Pank
over 10 years

This looks right but isn't passing.

“Oops, try again! It looks like your @age instance variable isn’t set equal to the age parameter passed to your initialize method.”

class Person
  def initialize(name, profession, age)
    @name = name
    @profession = profession
    @age = age
  end
end

Answer 5209529c548c35c527000d75

5 votes

Permalink

Try switching the order of the arguments ‘age’ and ‘profession’ after ‘initialize.’ The way they check for correctness is sometimes buggy, it might just be expecting you to list ‘age’ first.

That is the only difference between your code and mine.

points
Submitted by Rainbough Phillips
over 10 years

4 comments

Nicole Pank over 10 years

That was it, thank you!

Cristi Sturgill over 10 years

class Person def initialize(name, age, profession) @name = name @age = age @profession = profession end end

fdre3wsd over 10 years

name, age, profession seems to be the order

Sofia Perwallius almost 10 years

Tnx a bunch:)