Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add some :nodoc: to SyntaxErrorProxy and friends #49024

Merged
merged 1 commit into from
Aug 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ def exception_id
end

private
class SourceMapLocation < DelegateClass(Thread::Backtrace::Location)
class SourceMapLocation < DelegateClass(Thread::Backtrace::Location) # :nodoc:
def initialize(location, template)
super(location)
@template = template
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

class Thread::Backtrace::Location
class Thread::Backtrace::Location # :nodoc:
if defined?(ErrorHighlight) && Gem::Version.new(ErrorHighlight::VERSION) >= Gem::Version.new("0.4.0")
def spot(ex)
ErrorHighlight.spot(ex, backtrace_location: self)
Expand Down
4 changes: 2 additions & 2 deletions activesupport/lib/active_support/syntax_error_proxy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ def backtrace
parse_message_for_trace + super
end

class BacktraceLocation < Struct.new(:path, :lineno, :to_s)
class BacktraceLocation < Struct.new(:path, :lineno, :to_s) # :nodoc:
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one surprises me a bit because SyntaxErrorProxy already has :nodoc:, but somehow the nested classes are documented: https://edgeapi.rubyonrails.org/classes/ActiveSupport/SyntaxErrorProxy/BacktraceLocation.html

def spot(_)
end

def label
end
end

class BacktraceLocationProxy < DelegateClass(Thread::Backtrace::Location)
class BacktraceLocationProxy < DelegateClass(Thread::Backtrace::Location) # :nodoc:
def initialize(loc, ex)
super(loc)
@ex = ex
Expand Down