mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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:
parent
a9c7e16008
commit
546dc52e79
2 changed files with 6 additions and 2 deletions
|
@ -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__')
|
||||
|
|
Loading…
Reference in a new issue