This integer returns the current initial length of the buffer.
This sets the initial length of the buffer to length
, if length
> 0, otherwise its value isn’t changed.
A node that is missing from the syntax tree. This is only used in the case of a syntax error. The parser gem doesn’t have such a concept, so we invent our own here.
Wonky heredoc tab/spaces rules. github.com/ruby/prism/blob/v1.3.0/src/prism.c#L16528-L16545
A node that is missing from the syntax tree. This is only used in the case of a syntax error. The parser gem doesn’t have such a concept, so we invent our own here.
def foo((bar, baz)); end ^^^^^^^^^^
if /foo #{bar}/ then end ^^^^^^^^^^^^
if /foo #{bar}/ then end ^^^^^^^^^^^^
@@foo &&= bar
becomes
@@foo && @@foo = bar
@@foo ||= bar
becomes
defined?(@@foo) ? @@foo : @@foo = bar
@@foo += bar
becomes
@@foo = @@foo + bar
$foo ||= bar
becomes
defined?($foo) ? $foo : $foo = bar
$foo += bar
becomes
$foo = $foo + bar
The logical inverse of ‘capture_last_end_same_indent`
When there is an invalid block with an ‘end` missing a keyword right after another `end`, it is unclear where which end is missing the keyword.
Take this example:
class Dog # 1 puts "woof" # 2 end # 3 end # 4
the problem line will be identified as:
> end # 4
This happens because lines 1, 2, and 3 are technically valid code and are expanded first, deemed valid, and hidden. We need to un-hide the matching keyword on line 1. Also work backwards and if there’s a mis-matched end, show it too
Returns debugging information about this node as a string.
Returns debugging information about this location as a string.
Indicates whether this DH
instance has a private key associated with it or not. The private key may be retrieved with DH#priv_key.
Verifies whether the signature is valid given the message digest input. It does so by validating sig
using the public key of this DSA
instance.
Deprecated in version 3.0. Consider using PKey::PKey#sign_raw
and PKey::PKey#verify_raw
instead.
digest
A message digest of the original input data to be signed.
sig
A DSA signature value.
Indicates whether this DSA
instance has a private key associated with it or not. The private key may be retrieved with DSA#private_key.