From: Adam Prescott Date: 2011-09-10T02:25:09+09:00 Subject: [ruby-core:39432] Re: [Backport93 - Backport #5287] 1.9.3 - Interpolation in a string causes the string's encoding to be set to ASCII-8BIT On Fri, Sep 9, 2011 at 3:07 PM, Yui NARUSE wrote: >> ��I guess "no" is the answer? > > default_internal doesn't effect on this situation. > "#{a}" is considered as ` s = a.to_s > So "no" is the answer, s's encoding depends a's encoding. > >> ��What about "foo#{a}bar"? Would that have the same encoding result as >> ��"#{a}", or is the latter just a special case? (Either choice seems >> ��counterintuitive to me.) > > "foo#{a}bar" is considered as ` s = "foo"; s.concat(a.to_s); s.concat("bar"). > So the resulted s's encoding depends "foo". Helpful to know, thanks.