mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
31c94ffeb5
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23659 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
28 lines
587 B
Ruby
28 lines
587 B
Ruby
#
|
|
# This file defines a $log variable for logging, and a time() method for
|
|
# recording timing information.
|
|
#
|
|
#--
|
|
# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
|
|
# All rights reserved.
|
|
# See LICENSE.txt for permissions.
|
|
#++
|
|
|
|
require 'rubygems'
|
|
|
|
file, lineno = Gem.location_of_caller
|
|
|
|
warn "#{file}:#{lineno}:Warning: RubyGems' lib/rubygems/timer.rb deprecated and will be removed on or after June 2009."
|
|
|
|
$log = Object.new
|
|
|
|
# :stopdoc:
|
|
def $log.debug(message)
|
|
Gem.debug message
|
|
end
|
|
|
|
def time(msg, width=25, &block)
|
|
Gem.time(msg, width, &block)
|
|
end
|
|
# :startdoc:
|
|
|