teespy <teespy / bigfoot.com> writes:

> I think there is a little error in ruby's guide 
> ( www.ruby-lang.org/en/pdf-doc/rubyguide_A4.pdf )
> 
> Look at page 16, the C example of a loop, quoting:
> 
> char *str;
> for (str = "abcdefg"; *str != '\0'; str++) {
> 	/* process a character here */
> }
> 
> I think  'str = "abcdefg"' isn't legal, and should be replaced with
> strcpy(str, 'abcdefg');
              ^       ^ -- probably meant " ?

> That's it, nothing important, but may be worth fixing in the next
> release of the guide.

well, if it wasn't legal I'd agree, but it is :)  (try it!)

-- 
Josh Huber