summaryrefslogtreecommitdiff
path: root/bootstraptest/test_autoload.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-12-04 18:29:20 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-12-04 18:29:20 +0000
commit8e864d1e8628a99a2187044f5c987f802dee6ab0 (patch)
treeb0046153d1d9e7c76b3ac47f99f55dd0d3ea8d0d /bootstraptest/test_autoload.rb
parent0b10c320795e0784d9e4d269ece8f53f79ff3dd6 (diff)
* load.c (rb_get_load_path): returns the load path without
touching. * load.c (rb_feature_provided): new function to return the loading path in addition to rb_provided(). * load.c (search_required): sets path if loading. * variable.c (autoload_provided): load paths are expanded to check if loading. * variable.c (autoload_node): keeps autoload mark while loading. [ruby-core:20235] * variable.c (rb_const_get_0): loops while autoload mark is set. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20531 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bootstraptest/test_autoload.rb')
-rw-r--r--bootstraptest/test_autoload.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/bootstraptest/test_autoload.rb b/bootstraptest/test_autoload.rb
index 05376df220..048256170e 100644
--- a/bootstraptest/test_autoload.rb
+++ b/bootstraptest/test_autoload.rb
@@ -50,3 +50,12 @@ assert_equal 'ok', %q{
module M; end
Thread.new{eval('$SAFE=4; ZZZ.new.hoge')}.value
}
+
+assert_equal 'okok', %q{
+ open("zzz.rb", "w") {|f| f.puts "class ZZZ; def self.ok;:ok;end;end"}
+ autoload :ZZZ, "./zzz.rb"
+ t1 = Thread.new {ZZZ.ok}
+ t2 = Thread.new {ZZZ.ok}
+ [t1.value, t2.value].join
+}
+