On Dec 2, 2006, at 4:28 AM, Edwin Fine wrote: > Well, I found a bizarre and (to me) totally inexplicable way to get > rid > of the warning. This is from the quiz turtle_view.rb file. Adding an > explicit return value (any value; I used nil) to the draw method gets > rid of the warning. WTF??? > > # Transform the turtle's track into TkcLine objects and add them to > the > # canvas' display list. This method expects a track to be an > array of > # the form > # track ::= [segment, segment, ...] > # segment ::= [point, point, ...] > # point ::= [x, y] > # where x and y are floats. > def draw > @turtle.track.each do |seqment| > if seqment.size > 1 > pts = seqment.collect { |pt| transform(pt) } > TkcLine.new(@canvas, pts) > end > end > nil # Adding this (or any return value) stops that @encoding > warning > end > > I just dunno. Weird. I'm just as mystified as you area as to why it works, but I'm glad you found a work-around that turns off all the warnings. Regards, Morton