Skip to content

Commit acd4f94

Browse files
jamesarosenzuk
authored andcommitted
fixed call to set_logger in LoggerWrapper#initialize -- was causing warnings
1 parent 06148ff commit acd4f94

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/casclient.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def call(severity, time, progname, msg)
4646
# will quietly swallow any logging calls.
4747
class LoggerWrapper
4848
def initialize(real_logger=nil)
49-
set_logger(real_logger)
49+
set_real_logger(real_logger)
5050
end
5151
# Assign the 'real' Logger instance that this dummy instance wraps around.
5252
def set_real_logger(real_logger)
@@ -55,7 +55,7 @@ def set_real_logger(real_logger)
5555
# Log using the appropriate method if we have a logger
5656
# if we dont' have a logger, gracefully ignore.
5757
def method_missing(name, *args)
58-
if @real_logger && @real_logger.respond_to?(name)
58+
if instance_variable_defined?(@real_logger) && @real_logger.respond_to?(name)
5959
@real_logger.send(name, *args)
6060
end
6161
end

0 commit comments

Comments
 (0)