summaryrefslogtreecommitdiff
path: root/bootstraptest/test_load.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-02-27 06:49:43 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-02-27 06:49:43 +0000
commit5f47ed9b59afa0fbaa30aa191d739a260f54c3f9 (patch)
treec8f72dd0fb781b4c2fd3965742e8a4bdb5b99818 /bootstraptest/test_load.rb
parentc691d55bcdd09081bb18d7ee88983175470f7249 (diff)
* file.c (file_load_ok): checks if regular file. [ruby-dev:38097]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22655 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bootstraptest/test_load.rb')
-rw-r--r--bootstraptest/test_load.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/bootstraptest/test_load.rb b/bootstraptest/test_load.rb
index 18e8cc0..e63c93a 100644
--- a/bootstraptest/test_load.rb
+++ b/bootstraptest/test_load.rb
@@ -13,3 +13,15 @@ assert_equal 'ok', %q{
}.map {|t| t.value }
vs[0] == M && vs[1] == M ? :ok : :ng
}, '[ruby-dev:32048]'
+
+assert_equal 'ok', %q{
+ %w[a a/foo b].each {|d| Dir.mkdir(d)}
+ open("b/foo", "w") {|f| f.puts "$ok = :ok"}
+ $:.replace(%w[a b])
+ begin
+ load "foo"
+ $ok
+ rescue => e
+ e.message
+ end
+}, '[ruby-dev:38097]'