Skip to content

Commit

Permalink
update erb to 1.4.3
Browse files Browse the repository at this point in the history
git-svn-id: https://tdiary.svn.sourceforge.net/svnroot/tdiary/trunk/core@311 7f22e88f-374d-0410-998f-c91420d97ba2
  • Loading branch information
tadatadashi committed Apr 2, 2002
1 parent 179f59f commit 80ab605
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
1 change: 1 addition & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
2002.04.02 TADA Tadashi <sho@spc.gr.jp>
* conf.rhtml: make link to new Theme Gallery.
* conf.rhtml: add notify about comment mail sent to.
* update erb to 1.4.3.

2002.03.28 TADA Tadashi <sho@spc.gr.jp>
* default.css: no underline for links.
Expand Down
2 changes: 2 additions & 0 deletions erb/compile.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ def pre_compile(s, trim_mode)
list = s.split(re)
else
list = []
has_cr = (s[-1] == ?\n)
s.each do |line|
line = line.chomp.split(re)
line.shift if line[0]==''
Expand All @@ -28,6 +29,7 @@ def pre_compile(s, trim_mode)
list.push("\n")
end
end
list.pop unless has_cr
end
list
end
Expand Down
9 changes: 3 additions & 6 deletions erb/erbl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
require 'erb/compile'

class ERbLight
Revision = '$Date: 2002/03/14 16:23:43 $'
Revision = '$Date: 2002/03/28 14:22:23 $'

def self.version
"erbl.rb [1.4.1 #{ERbLight::Revision.split[1]}]"
"erbl.rb [1.4.3 #{ERbLight::Revision.split[1]}]"
end

def initialize(str, safe_level=nil, trim_mode=nil, eoutvar='_erbout')
Expand All @@ -24,16 +24,12 @@ def set_eoutvar(compiler, eoutvar = '_erbout')
compiler.put_cmd = "#{eoutvar}.concat"

cmd = []
cmd.push 'begin'
cmd.push("$SAFE = #{@safe_level}") if @safe_level
cmd.push "#{eoutvar} = ''"

compiler.pre_cmd = cmd

cmd = []
cmd.push('ensure')
cmd.push(eoutvar)
cmd.push('end')

compiler.post_cmd = cmd
end
Expand All @@ -45,6 +41,7 @@ def run(b=TOPLEVEL_BINDING)
def result(b=TOPLEVEL_BINDING)
if @safe_level
th = Thread.start {
$SAFE = @safe_level
eval(@src, b)
}
return th.value
Expand Down

0 comments on commit 80ab605

Please sign in to comment.