From: Masatoshi SEKI Date: 2009-01-11T04:56:40+09:00 Subject: [ruby-dev:37754] Re: [Bug #997] % after %> in erb 咳といいます。 On 2009/01/10, at 20:33, Yusuke Endoh wrote: > 遠藤です。 > > 最近になって 1.9 の erb の挙動が変わって気がつ > いたのですが、 > 行頭の % を有効にした場合の挙動が少し変わっています。 > > > $ ruby -rerb -ve 'p ERB.new("<%= 1 %>%", nil, "%").result' > ruby 1.8.5 (2006-08-25) [i486-linux] > "1%" > > $ ruby18 -rerb -ve 'p ERB.new("<%= 1 %>%", nil, "%").result' > ruby 1.8.7 (2009-01-09 revision 21407) [i686-linux] > "1" > > $ ruby19 -rerb -ve 'p ERB.new("<%= 1 %>%", nil, "%").result' > ruby 1.9.1 (2009-01-10 patchlevel-5000 trunk 21414) [i686-linux] > ruby19: warning: encoding 'UTF-8' is ignored, valid only in the > first line except for shebang line. > ruby19: warning: encoding 'Big5' is ignored, valid only in the first > line except for shebang line. > "1" > > > どうも %> の直後が行頭扱いになっているような気がする > のですが、 > これは意図した仕様変更でしょうか。 > とりあえずバグとして報告しておきます。 ありがとうございます。 これはバグだと思います。調査します。