I’m probably doing something stupid but I can’t figure out what it is.
The output I’m seeing from this program is
foo test
What I’m expecting to see is
foo abc test
Does anyone see anything obviously wrong here?
class Foo def initialize(l) @label = l end def label @label end def abc @abc end def abc=(abc) @abc end end foo = Foo.new('foo') foo.abc=('abc') puts foo.label puts foo.abc puts 'test'
You never set @abc in your
abc=method. It should look like