summaryrefslogtreecommitdiff
path: root/lib/erb.rb
diff options
context:
space:
mode:
authorseki <seki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-04-22 16:29:47 +0000
committerseki <seki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-04-22 16:29:47 +0000
commit5c4c320c81873df388acfd806336eb51d9e9229a (patch)
tree189d002232b2beda86dee7c7603c2a4250f2bc83 /lib/erb.rb
parenta16fc220ca2c65ae5d9108fb23c69146d82234ee (diff)
fix ERB::DefMethod bug
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3715 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/erb.rb')
-rw-r--r--lib/erb.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/erb.rb b/lib/erb.rb
index 62ce197..9d6dc9d 100644
--- a/lib/erb.rb
+++ b/lib/erb.rb
@@ -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