Project

General

Profile

Actions

Bug #997

closed

% after %> in erb

Added by mame (Yusuke Endoh) about 15 years ago. Updated almost 13 years ago.

Status:
Closed
Target version:
ruby -v:
Backport:
[ruby-dev:37751]

Description

=begin
遠藤です。

最近になって 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"

どうも %> の直後が行頭扱いになっているような気がするのですが、
これは意図した仕様変更でしょうか。
とりあえずバグとして報告しておきます。

--
Yusuke ENDOH
=end

Actions #1

Updated by seki (Masatoshi Seki) about 15 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

=begin
Applied in changeset r21431.
=end

Actions

Also available in: Atom PDF

Like0
Like0