No description provided.
replace @target.logger with logger method.
Why are you resubmitting the same PR once every few days?? #4600 #4622 #4638
@vijaydev I am sorry but there was some problem with my fork so had to delete them, reopen the PR.
Why is this change needed?
@vijaydev as there is already a logger method defined which returns @target.logger , so instead of calling @target.logger again, it makes sense to use the logger method.
@railsaholic, u r right!!
@josevalim Is it good enough? Thanks
Actually this only adds one more method call without any profit.
Plus if logger method is redefined by user, but logger? is not for some reason - this can lead to bugs as checked and returned objects can be different
@railsaholic thank you for your patch, but I believe the method is clearer by using @target.logger since it already tests for @target.respond_to?(:logger) in the same line.