masterkain / macruby

Ruby 1.9 ported to run directly on top of Mac OS X core technologies. Trunk mirror.

This URL has Read+Write access

macruby / ext / purelib.rb
100644 11 lines (10 sloc) 0.141 kb
1
2
3
4
5
6
7
8
9
10
11
nul = nil
$:.each_with_index {|path, index|
  if /\A(?:\.\/)*-\z/ =~ path
    nul = index
    break
  end
}
if nul
  $:[nul..-1] = ["."]
end