提交 19f59b6e 编写于 作者: J Jeremy Kemper

Dependencies: set load_file_name = file_name if it ends in .rb

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3176 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
上级 21d50e4d
......@@ -43,7 +43,7 @@ def clear
def require_or_load(file_name)
if load?
# Append .rb if we have a bare file name.
load_file_name = "#{file_name}.rb" unless file_name[-3..-1] == '.rb'
load_file_name = (file_name =~ /\.rb$/ ? file_name : "#{file_name}.rb")
# Enable warnings iff this file has not been loaded before.
if history.include?(file_name)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册