[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. Represents the use of a case statement.
case true case true
^^^^^^^^^
when false when false
end end
^^^^^^^^^^
- name: ClassNode - name: ClassNode
fields: fields:
- name: locals - name: locals
@ -818,7 +818,7 @@ nodes:
Represents the use of the `&&=` operator for assignment to a class variable. Represents the use of the `&&=` operator for assignment to a class variable.
@@target &&= value @@target &&= value
^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^
- name: ClassVariableOperatorWriteNode - name: ClassVariableOperatorWriteNode
fields: fields:
- name: name - name: name
@ -1183,13 +1183,13 @@ nodes:
Represents a find pattern in pattern matching. Represents a find pattern in pattern matching.
foo in *bar, baz, *qux foo in *bar, baz, *qux
^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^
foo in [*bar, baz, *qux] foo in [*bar, baz, *qux]
^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^
foo in Foo(*bar, baz, *qux) foo in Foo(*bar, baz, *qux)
^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^
- name: FlipFlopNode - name: FlipFlopNode
fields: fields:
- name: left - name: left
@ -1240,7 +1240,7 @@ nodes:
def foo(...) def foo(...)
bar(...) bar(...)
^^^^^^^^ ^^^
end end
- name: ForwardingParameterNode - name: ForwardingParameterNode
comment: | comment: |
@ -2237,8 +2237,8 @@ nodes:
begin begin
rescue Foo, *splat, Bar => ex rescue Foo, *splat, Bar => ex
^^^^^^
foo foo
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
end end
`Foo, *splat, Bar` are in the `exceptions` field. `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 } if String.instance_method(:unpack1).parameters.none? { |_, name| name == :offset }
String.prepend( String.prepend(
Module.new { Module.new {
def unpack1(format, offset: 0) def unpack1(format, offset: 0) # :nodoc:
offset == 0 ? super(format) : self[offset..].unpack1(format) offset == 0 ? super(format) : self[offset..].unpack1(format)
end end
} }