From 5df14ecebe580c4bbe46aa09411c96f1f6ec66d0 Mon Sep 17 00:00:00 2001 From: Kevin Newton Date: Mon, 30 Oct 2023 13:01:35 -0400 Subject: [PATCH] [ruby/prism] Fix up Ruby docs https://github.com/ruby/prism/commit/8062849d0d --- prism/config.yml | 20 ++++++++++---------- prism/templates/lib/prism/serialize.rb.erb | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/prism/config.yml b/prism/config.yml index e648459d64..7fe14ca671 100644 --- a/prism/config.yml +++ b/prism/config.yml @@ -777,10 +777,10 @@ nodes: comment: | Represents the use of a case statement. - case true - ^^^^^^^^^ - when false - end + case true + when false + end + ^^^^^^^^^^ - name: ClassNode fields: - name: locals @@ -818,7 +818,7 @@ nodes: Represents the use of the `&&=` operator for assignment to a class variable. @@target &&= value - ^^^^^^^^^^^^^^^^ + ^^^^^^^^^^^^^^^^^^ - name: ClassVariableOperatorWriteNode fields: - name: name @@ -1183,13 +1183,13 @@ nodes: Represents a find pattern in pattern matching. foo in *bar, baz, *qux - ^^^^^^^^^^^^^^^^^^^^^^ + ^^^^^^^^^^^^^^^ foo in [*bar, baz, *qux] - ^^^^^^^^^^^^^^^^^^^^^^^^ + ^^^^^^^^^^^^^^^^^ foo in Foo(*bar, baz, *qux) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + ^^^^^^^^^^^^^^^^^^^^ - name: FlipFlopNode fields: - name: left @@ -1240,7 +1240,7 @@ nodes: def foo(...) bar(...) - ^^^^^^^^ + ^^^ end - name: ForwardingParameterNode comment: | @@ -2237,8 +2237,8 @@ nodes: begin rescue Foo, *splat, Bar => ex - ^^^^^^ foo + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ end `Foo, *splat, Bar` are in the `exceptions` field. diff --git a/prism/templates/lib/prism/serialize.rb.erb b/prism/templates/lib/prism/serialize.rb.erb index 4ee474671a..da507709e3 100644 --- a/prism/templates/lib/prism/serialize.rb.erb +++ b/prism/templates/lib/prism/serialize.rb.erb @@ -4,7 +4,7 @@ require "stringio" if String.instance_method(:unpack1).parameters.none? { |_, name| name == :offset } String.prepend( Module.new { - def unpack1(format, offset: 0) + def unpack1(format, offset: 0) # :nodoc: offset == 0 ? super(format) : self[offset..].unpack1(format) end }