Trans wrote:
> Now that seemed like a really smart solution --but when I try it I get
> some really STRANGE behavior. In my code @start is assign to one of the
> procs, so then:
>
>   s = @start
>   p s
>   p s.call
>   p machine.instance_eval{ s }
>   p machine.instance_eval{ s.call }
>   p machine.instance_eval{ s.call.call.call }
>
> returns
>
>   #<Proc:0xb7cf868c / state_parser.rb:140>
>   #<Proc:0xb7cf868c / state_parser.rb:140>
>   #<Proc:0xb7cf868c / state_parser.rb:140>
>   #<Proc:0xb7cf868c / state_parser.rb:140>
>   #<Proc:0xb7cf868c / state_parser.rb:140>

er...

irb(main):001:0> start = 10
=> 10
irb(main):002:0> start = lambda { start }
=> #<Proc:0xb7b2f700@(irb):2>
irb(main):003:0> start.call
=> #<Proc:0xb7b2f700@(irb):2>