[ruby/prism] Fix up Ruby docs

https://github.com/ruby/prism/commit/8062849d0d
This commit is contained in:
Kevin Newton 2023-10-30 13:01:35 -04:00
parent 8c0eb221b7
commit 5df14ecebe
2 changed files with 11 additions and 11 deletions

View File

@ -778,9 +778,9 @@ nodes:
Represents the use of a case statement.
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.

View File

@ -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
}