diff options
| author | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-12-05 13:33:59 +0000 |
|---|---|---|
| committer | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-12-05 13:33:59 +0000 |
| commit | 9b6479d949d0e8b2ae4743b2be96271c2fc6b84d (patch) | |
| tree | e29dc32b54211e94692192b9ed7296d464a99290 /bootstraptest | |
| parent | a2d32ebeb5d26bf8a0f5b905f8c6760e1686b100 (diff) | |
merges r20531 from trunk into ruby_1_9_1.
* 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: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_9_1@20551 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bootstraptest')
| -rw-r--r-- | bootstraptest/test_autoload.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/bootstraptest/test_autoload.rb b/bootstraptest/test_autoload.rb index 05376df22..048256170 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 +} + |
