summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-05-28 09:31:22 +0000
committerknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-05-28 09:31:22 +0000
commit0570e27b47ed2d2916a1f2fcee1b0e903916a820 (patch)
tree321e8ae9d320488aa53f7a013effd4e9b3da2d77 /ext
parent3d84188855f426dcc1d1b738ba3480cf79b82521 (diff)
Merge from ruby_1_8.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@16676 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/purelib.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/ext/purelib.rb b/ext/purelib.rb
index 284254a8b4..dbe514c34a 100644
--- a/ext/purelib.rb
+++ b/ext/purelib.rb
@@ -1,3 +1,10 @@
-if nul = $:.find_index {|path| /\A(?:\.\/)*-\z/ =~ path}
+nul = nil
+$:.each_with_index {|path, index|
+ if /\A(?:\.\/)*-\z/ =~ path
+ nul = index
+ break
+ end
+}
+if nul
$:[nul..-1] = ["."]
end