diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-01-14 12:13:11 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-01-14 12:13:11 +0000 |
commit | 546dc52e790476e608c367013bbcb7df9cb9a2c7 (patch) | |
tree | 2f4d322d113e79551b3e57c80976fd26e5c411e1 | |
parent | a9c7e160089dc9bba677abf44e6715d1bcae13cf (diff) | |
download | ruby-546dc52e790476e608c367013bbcb7df9cb9a2c7.tar.gz |
* 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
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | test/inlinetest.rb | 3 |
2 files changed, 6 insertions, 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 diff --git a/test/inlinetest.rb b/test/inlinetest.rb index 8cc75da9c7..40819913b5 100644 --- a/test/inlinetest.rb +++ b/test/inlinetest.rb @@ -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__') |