Forums | Admin

Discussion Forums: open-discussion

Start New Thread Start New Thread

 

By: Jon Plaut
sub! does not work [ reply ]  
2012-11-06 20:01
As the author commented, in the "eliminate" function, using values[s].sub! instead of values[s] = values[s].sub does not work. Doing sub!(d, '') seems to replace every instance of d in values (not just in values[s]) with ''. Is this a Ruby bug or is there some nuance that I'm missing here?