diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-01-10 13:46:47 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-01-10 13:46:47 +0000 |
commit | dd55661f56d7105adb5f6d5fe3ea1994f9d36390 (patch) | |
tree | 56ae788ca7643105f53a471b8692ba9c69ee4657 /test | |
parent | 3e82d923383d0ae7c7fc6059aa7e831cbc6510ac (diff) |
* include/ruby/defines.h (CASEFOLD_FILESYSTEM): HFS+ is case
insensitive.
* load.c (loaded_feature_path, rb_feature_p, load_lock): on a
case-insensitive filesystem, loaded features search should
ignore case. [ruby-core:34297]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30508 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_require.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/ruby/test_require.rb b/test/ruby/test_require.rb index aef7f7b527..1d61a83e86 100644 --- a/test/ruby/test_require.rb +++ b/test/ruby/test_require.rb @@ -322,4 +322,20 @@ class TestRequire < Test::Unit::TestCase [], /\$LOADED_FEATURES is frozen; cannot append feature \(RuntimeError\)$/, bug3756) end + + def test_case_insensitive + load_path = $:.dup + loaded = $".dup + path = File.expand_path(__FILE__) + $:.unshift(File.dirname(path)) + $".push(path) unless $".include?(path) + bug4255 = '[ruby-core:34297]' + assert_equal(false, $bug4255 ||= false, bug4255) + $bug4255 = true + f = File.basename(__FILE__, ".*").upcase + assert_equal(false, require(f)) + ensure + $:.replace(load_path) + $".replace(loaded) + end if File.identical?(__FILE__, __FILE__.upcase) end |