Skip to content

Commit

Permalink
* gem_prelude.rb: disables debug and verbose flags to suppress failure
Browse files Browse the repository at this point in the history
  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
  • Loading branch information
nobu committed Oct 26, 2008
1 parent b98a6b7 commit 945faf9
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 13 deletions.
5 changes: 4 additions & 1 deletion ChangeLog
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Sun Oct 26 18:42:18 2008 Nobuyoshi Nakada <[email protected]>
Sun Oct 26 19:18:36 2008 Nobuyoshi Nakada <[email protected]>

* thread.c (blocking_region_{begin,end}): declared as inline.

Expand All @@ -11,6 +11,9 @@ Sun Oct 26 18:42:18 2008 Nobuyoshi Nakada <[email protected]>
* ext/io/wait/{extconf.rb,wait.c}: needs sys/ioctl.h for fcntl on
cygwin.

* gem_prelude.rb: disables debug and verbose flags to suppress failure
messages. interpolation does not occur inside single quotes.

* test/ruby/envutil.rb (assert_in_out_err): disables builtin rubygems
to get rid of the interference.

Expand Down
30 changes: 18 additions & 12 deletions gem_prelude.rb
Original file line number Diff line number Diff line change
Expand Up @@ -80,18 +80,24 @@ def self.ensure_gem_subdirectories(path)

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
Expand Down Expand Up @@ -183,12 +189,12 @@ def push_all_highest_version_gems_on_load_path

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

Expand Down

0 comments on commit 945faf9

Please sign in to comment.