Are Ruby formatted strings and interpolated strings identical in behaviour?
- by Steve Weet
Do the following two lines of code behave in exactly the same way despite slightly different implementations
values.map{ |k,v| __send__('%s=' % k.to_s, v) }
values.map{ |k,v| __send__("#{k.to_s}=", v) }
The second line would be a more common ruby idiom so I was wondering why the other method was used when this was in the Rails Core which I would expect to use idiomatic ruby.