Skip to content

Commit 0a43d8d

Browse files
author
Peter Rezikov
committed
Eliminate :: in void context warning
"warning: possibly useless use of :: in void context" apperars in files if we use a module constant instead of require. This commit replaces contants by requires and fixes warnings.
1 parent c94ae1f commit 0a43d8d

File tree

5 files changed

+8
-5
lines changed

5 files changed

+8
-5
lines changed

lib/rails_semantic_logger/extensions/action_cable/tagged_logger_proxy.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ActionCable::Connection::TaggedLoggerProxy
1+
require "action_cable/connection/tagged_logger_proxy"
22

33
module ActionCable
44
module Connection

lib/rails_semantic_logger/extensions/action_controller/live.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Log actual exceptions, not a string representation
2-
ActionController::Live
2+
require "action_controller"
3+
34
module ActionController
45
module Live
56
undef_method :log_error

lib/rails_semantic_logger/extensions/action_dispatch/debug_exceptions.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Log actual exceptions, not a string representation
2-
ActionDispatch::DebugExceptions
2+
require "action_dispatch"
3+
34
module ActionDispatch
45
class DebugExceptions
56
private

lib/rails_semantic_logger/extensions/action_view/streaming_template_renderer.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Log actual exceptions, not a string representation
2-
ActionView::StreamingTemplateRenderer
2+
require "action_view/renderer/streaming_template_renderer"
33

44
module ActionView
55
class StreamingTemplateRenderer

lib/rails_semantic_logger/extensions/rails/server.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Patch the Rails::Server log_to_stdout so that it logs via SemanticLogger
2-
Rails::Server
2+
require "rails"
3+
34
module Rails
45
class Server
56
private

0 commit comments

Comments
 (0)