summaryrefslogtreecommitdiff
path: root/test/ruby/test_marshal.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_marshal.rb')
-rw-r--r--test/ruby/test_marshal.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/test/ruby/test_marshal.rb b/test/ruby/test_marshal.rb
index 3bd2cc08f1..2008e3f36a 100644
--- a/test/ruby/test_marshal.rb
+++ b/test/ruby/test_marshal.rb
@@ -1,5 +1,12 @@
require 'test/unit'
-require File.join(File.dirname(File.expand_path(__FILE__)), 'marshaltestlib')
+dir = File.dirname(File.expand_path(__FILE__))
+orgpath = $:.dup
+begin
+ $:.push(dir)
+ require 'marshaltestlib'
+ensure
+ $:.replace(orgpath)
+end
$KCODE = 'none'