Results for: "Array.new"

SyntaxSuggest.handle_error [Public]

Takes a ‘SyntaxError` exception, uses the error message to locate the file. Then the file will be analyzed to find the location of the syntax error and emit that location to stderr.

Example:

begin
  require 'bad_file'
rescue => e
  SyntaxSuggest.handle_error(e)
end

By default it will re-raise the exception unless ‘re_raise: false`. The message output location can be configured using the `io: $stderr` input.

If a valid filename cannot be determined, the original exception will be re-raised (even with ‘re_raise: false`).

def foo(&bar); end

^^^^

A block’s parameters.

def foo(…); bar(…); end

^^^

-> { it } ^^^^^^^^^

-> { _1 + _2 } ^^^^^^^^^^^^^^

def foo(bar = 1); end

^^^^^^^

Visit a destructured positional parameter node.

foo = 1 and bar => ^foo

^^^^

def foo(bar); end

^^^

def foo(*bar); end

^^^^

def foo(*); end

^
No documentation available
No documentation available

Interpolate substitution vars in the arg (i.e. $(DEFFILE))

def foo(bar, *baz); end

^^^^^^^^^

def foo(bar, *baz); end

^^^^^^^^^

def foo((bar, baz)); end

^^^^^^^^^^

Compile a ClassVariableOperatorWriteNode node

Compile a GlobalVariableOperatorWriteNode node

Compile a InstanceVariableOperatorWriteNode node

Compile a LocalVariableOperatorWriteNode node

@@foo += bar

becomes

@@foo = @@foo + bar

$foo += bar

becomes

$foo = $foo + bar

@foo += bar

becomes

@foo = @foo + bar

foo += bar

becomes

foo = foo + bar

Search took: 7ms  ·  Total Results: 3535