mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
fix ERB::DefMethod bug
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3715 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
a16fc220ca
commit
5c4c320c81
1 changed files with 3 additions and 1 deletions
|
@ -277,8 +277,10 @@ class ERB
|
|||
if erb.kind_of? String
|
||||
fname = erb
|
||||
File.open(fname) {|f| erb = ERB.new(f.read) }
|
||||
erb.def_method(self, methodname, fname)
|
||||
else
|
||||
erb.def_method(self, methodname)
|
||||
end
|
||||
erb.def_method(self, methodname, fname)
|
||||
end
|
||||
module_function :def_erb_method
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue