From: Tim Hunter Date: 2007-10-02T06:51:27+09:00 Subject: Re: void value expression for 'retry' Mohammad Khan wrote: > following code returns, > retry.rb:13: void value expression > > What is wrong with this code? > > #!/usr/bin/env ruby > > > retry_count = 0 > retry_max = 4 > > begin > sleep 30 > > rescue Interrupt > if ( retry_count < retry_max) > retry_count++ > retry > end > rescue > raise > end > > > Thanks, > Mohammad > Ruby doesn't have the post-increment (++) operator. Use retry_count += 1 instead. -- RMagick OS X Installer [http://rubyforge.org/projects/rmagick/] RMagick Hints & Tips [http://rubyforge.org/forum/forum.php?forum_id=1618] RMagick Installation FAQ [http://rmagick.rubyforge.org/install-faq.html]