Asfand Yar Qazi wrote:
> Hi,
>
> Its odd - if I place a comment at the end of a program I'm writing, its
> ok. If I take out the comment, the program crashes?!
>
> Any ideas why?
>
> p.s. Its a game with lots of system access going on.
>
Basically, I'm doing something like this:
Game::new(:userdir => ".game_0.1",
:datadir => "data") do |game|
game.state_machine.add("1", DefaultState.new)
game.state_machine.add("2", AnotherState.new)
end
<crash at this point>
After executing the block, the game's initialise method goes straight
into the game loop. On exiting the loop (when the game quits)
deinitialisation is performed.
A crash occurs at the shown point.
But if I change the top line to:
g = Game::new(:userdir => ".game_0.1",
:datadir => "data") do |game|
....
Then its OK.
What's going on? Any ideas?
--
http://www.it-is-truth.org/