Skip to content

Instantly share code, notes, and snippets.

@codatory
Created January 9, 2013 15:35
Show Gist options
  • Save codatory/4494070 to your computer and use it in GitHub Desktop.
Save codatory/4494070 to your computer and use it in GitHub Desktop.
require most of Ruby 1.9's standard library
libs = Dir.glob("#{ENV['MY_RUBY_HOME']}/lib/ruby/1.9.1/*.rb").map{|i| i.split('/').last.split('.').first}
libs.reject!{|i| i == 'debug'}
libs.reject!{|i| i =~ /tk/}
libs.reject!{|i| i =~ /^[A-Z]/}
libs.each do |lib|
puts "Loading #{lib}"
require lib
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment