mirror of
https://github.com/meineerde/dotfiles.git
synced 2025-10-17 19:41:01 +00:00
Check if Logger is defined in .irbrc (newer Rubies do not ship logger by default)
This commit is contained in:
parent
ee4b885478
commit
0e54dc1360
3
.irbrc
3
.irbrc
@ -1,7 +1,6 @@
|
||||
require 'rubygems'
|
||||
|
||||
# Rails will log to irb
|
||||
require 'logger'
|
||||
if ENV.include?('RAILS_ENV') && !Object.const_defined?('RAILS_DEFAULT_LOGGER')
|
||||
if defined?(Logger) && ENV.include?('RAILS_ENV') && !Object.const_defined?('RAILS_DEFAULT_LOGGER')
|
||||
Object.const_set('RAILS_DEFAULT_LOGGER', Logger.new(STDOUT))
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user