Skip to content

Instantly share code, notes, and snippets.

@ab5tract
Created November 26, 2008 01:21
Show Gist options
  • Save ab5tract/29216 to your computer and use it in GitHub Desktop.
Save ab5tract/29216 to your computer and use it in GitHub Desktop.
module False
def self.require(str)
$:.each{|cur|
if File.directory?(cur)
pos = Dir.entries(cur)
if ((pos.include? "#{str}.rb") or (pos.include? str) or (pos.include? "#{str}.so"))
total = File.expand_path(str, cur)
unless $".include? total
load(total)
$" << total
return true
else
return false
end
end
end
}
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment