summaryrefslogtreecommitdiff
path: root/gem_prelude.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-10-26 10:18:39 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-10-26 10:18:39 (GMT)
commit945faf92e69d173ccea393caefaf8c222a251bb8 (patch)
tree0aac9f36ed37d0d520f42db84284a84e884f127f /gem_prelude.rb
parentb98a6b7ac06219d3e4a0a46087f1a8c2a11438bb (diff)
* gem_prelude.rb: disables debug and verbose flags to suppress failure
messages. interpolation does not occur inside single quotes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19949 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'gem_prelude.rb')
-rw-r--r--gem_prelude.rb30
1 files changed, 18 insertions, 12 deletions
diff --git a/gem_prelude.rb b/gem_prelude.rb
index b483a65..4221102 100644
--- a/gem_prelude.rb
+++ b/gem_prelude.rb
@@ -80,18 +80,24 @@ if defined?(Gem) then
GEM_PRELUDE_METHODS = Gem.methods(false)
- require 'rubygems/defaults'
-
begin
- require 'rubygems/defaults/operating_system'
- rescue LoadError
- end
+ verbose, debug = $VERBOSE, $DEBUG
+ $VERBOSE = $DEBUG = nil
+ require 'rubygems/defaults'
- if defined?(RUBY_ENGINE) then
begin
- require 'rubygems/defaults/#{RUBY_ENGINE}'
+ require 'rubygems/defaults/operating_system'
rescue LoadError
end
+
+ if defined?(RUBY_ENGINE) then
+ begin
+ require "rubygems/defaults/#{RUBY_ENGINE}"
+ rescue LoadError
+ end
+ end
+ ensure
+ $VERBOSE, $DEBUG = verbose, debug
end
module QuickLoader
@@ -183,12 +189,12 @@ if defined?(Gem) then
require_paths = []
- GemPaths.values.each do |path|
- if File.exist?(File.join(path, ".require_paths"))
- require_paths.concat(File.read(File.join(path, ".require_paths")).split.map {|require_path| File.join(path, require_path)})
+ GemPaths.each_value do |path|
+ if File.exist?(file = File.join(path, ".require_paths"))
+ require_paths.concat(File.read(file).split.map {|require_path| File.join(path, require_path)})
else
- require_paths << File.join(path, "bin") if File.exist?(File.join(path, "bin"))
- require_paths << File.join(path, "lib") if File.exist?(File.join(path, "lib"))
+ require_paths << file if File.exist?(file = File.join(path, "bin"))
+ require_paths << file if File.exist?(file = File.join(path, "lib"))
end
end