Results for: "String#[]"

This lexes with the Ripper lex. It drops any space events but otherwise returns the same tokens. Raises SyntaxError if the syntax in source is invalid.

Returns a clock resolution as determined by POSIX function clock_getres():

Process.clock_getres(:CLOCK_REALTIME) # => 1.0e-09

See Process.clock_gettime for the values of clock_id and unit.

Examples:

Process.clock_getres(:CLOCK_PROCESS_CPUTIME_ID, :float_microsecond) # => 0.001
Process.clock_getres(:CLOCK_PROCESS_CPUTIME_ID, :float_millisecond) # => 1.0e-06
Process.clock_getres(:CLOCK_PROCESS_CPUTIME_ID, :float_second)      # => 1.0e-09
Process.clock_getres(:CLOCK_PROCESS_CPUTIME_ID, :microsecond)       # => 0
Process.clock_getres(:CLOCK_PROCESS_CPUTIME_ID, :millisecond)       # => 0
Process.clock_getres(:CLOCK_PROCESS_CPUTIME_ID, :nanosecond)        # => 1
Process.clock_getres(:CLOCK_PROCESS_CPUTIME_ID, :second)            # => 0

In addition to the values for unit supported in Process.clock_gettime, this method supports :hertz, the integer number of clock ticks per second (which is the reciprocal of :float_second):

Process.clock_getres(:TIMES_BASED_CLOCK_PROCESS_CPUTIME_ID, :hertz)        # => 100.0
Process.clock_getres(:TIMES_BASED_CLOCK_PROCESS_CPUTIME_ID, :float_second) # => 0.01

Accuracy: Note that the returned resolution may be inaccurate on some platforms due to underlying bugs. Inaccurate resolutions have been reported for various clocks including :CLOCK_MONOTONIC and :CLOCK_MONOTONIC_RAW on Linux, macOS, BSD or AIX platforms, when using ARM processors, or when using virtualization.

No documentation available
No documentation available
No documentation available
No documentation available
No documentation available
No documentation available

Foo = 1 ^^^^^^^

Foo, Bar = 1 ^^^ ^^^

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

^^^

def foo(…); end

^^^

super ^^^^^

super {} ^^^^^^^^

Visit a destructured positional parameter node.

foo = 1 and bar => ^foo

^^^^

class << self; end ^^^^^^^^^^^^^^^^^^

__ENCODING__ ^^^^^^^^^^^^

No documentation available
No documentation available

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.

No documentation available

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

^^^^^^^^^^
Search took: 5ms  ·  Total Results: 2715