From: "Vince /." Date: 2006-09-20T20:20:32+09:00 Subject: simple code doesnt work Hi everyone, Can anyone tell me why this doesnt work? Im getting this error cf.rb:26: undefined method `price' for # (NoMethodError) thanks, just learning :-) class Ticket def initialize(venue,date) @v = venue @d = date end def venue @v end def date @d end def price=(amount) @price = amount end end ticket = Ticket.new("yer","11/12/2006") puts "ticket stuff is #{ticket.venue} #{ticket.date}" ticket.price = (5.00) puts "ticket mooch is #{ticket.price}" -- Posted via http://www.ruby-forum.com/.