[...] > But this is valid *only* for the variable that ruby can see (at compile > time) and *NOT* for variables which are in a string like in "a: #{a}\n" I see. > At runtime, each time that ruby enter in the block, it reset the list > of local variables for this block (i.e. you have an empty list) Ok, I had overlooked this. > When it find : > > print "a: #{a}\n" # Name Error > > it will the first time compile the part between #{}. Because for this > iteration a was never assigned, it don't exist and ruby resolve it as a > function call. This is why it give an error. Thanks a lot ! -- Thomas Junier Swiss Institute of Bioinformatics http://pcisrec-d402b.unil.ch/~tjunier