On Feb 12, 2007, at 4:36 AM, Brian Candler wrote:

> On Mon, Feb 12, 2007 at 08:58:41AM +0000, Brian Candler wrote:
>> A reply pointed to
>> http://onestepback.org/packages/rubyturtles/
>
> I've tried it now. It works exactly how I was hoping:
>
> $ irb1.8 -rtkturtle
> irb(main):001:0> include TurtleGraphics
> => Object
> irb(main):002:0> fred = Turtle.new
> => Turtle(0,[0,0])
> irb(main):003:0> fred.pendown
> => nil
> irb(main):004:0> 3.times { fred.forward 100; fred.turn 120 }
> => 3
>
> The included examples all work, although the test suite generates a  
> few
> parser warnings (possibly meaning it was written for ruby 1.6)
>
> However I love the following stanza from testturtle.rb:
>
> require 'mock'
> require 'turtle'

The Ruby Quiz turtle graphics kit is more Logo-like. One can write in  
the style of your example or one can write (using Logo short form  
commands)

    Turtle.new.run { fd 100; rt 120 }

or (using Logo long form commands)

    Turtle.new.run { forward 100; right 120 }

It was written and tested with Ruby 1.8.

Regards, Morton