Method: TCOMethod::Mixin#tco_eval

Defined in:
lib/tco_method/mixin.rb

#tco_eval(code) ⇒ Object

Evaluate the given code String with tail call optimization enabled.

Parameters:

  • code (String)

    The code to evaluate with tail call optimization enabled.

Returns:

  • (Object)

    Returns the value of the final expression of the provided code String.

Raises:

  • (ArgumentError)

    if the provided code argument is not a String.

See Also:



30
31
32
# File 'lib/tco_method/mixin.rb', line 30

def tco_eval(code)
  TCOMethod.tco_eval(code)
end