зеркало из https://github.com/github/ruby.git
* test/inlinetest.rb (InlineTest::eval_part): eval under the top
level environment. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5465 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
a9c7e16008
Коммит
546dc52e79
|
@ -1,3 +1,8 @@
|
|||
Wed Jan 14 21:13:06 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* test/inlinetest.rb (InlineTest::eval_part): eval under the top
|
||||
level environment.
|
||||
|
||||
Wed Jan 14 17:54:17 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* test/inlinetest.rb (InlineTest::loadtest): require instead of
|
||||
|
|
|
@ -7,12 +7,11 @@ module InlineTest
|
|||
raise RuntimeError.new("No #{part} part in the library '#{filename}'")
|
||||
end
|
||||
require(libname)
|
||||
eval(endpart, nil, path, mainpart.count("\n")+1)
|
||||
eval(endpart, TOPLEVEL_BINDING, path, mainpart.count("\n")+1)
|
||||
end
|
||||
module_function :eval_part
|
||||
|
||||
def loadtest(libname)
|
||||
Kernel.require(libname)
|
||||
in_critical do
|
||||
in_progname(libpath(libname)) do
|
||||
eval_part(libname, /^(?=if\s+(?:\$0\s*==\s*__FILE__|__FILE__\s*==\s*\$0)(?:[\#\s]|$))/, '$0 == __FILE__')
|
||||
|
|
Загрузка…
Ссылка в новой задаче