method

get_end_token

Importance_1
Ruby latest stable (v2_5_5) - 0 notes - Class: Ruby

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v2_2_9) is shown here.

get_end_token(tk) public

Little hack going on here. In the statement:

f = 2*(1+yield)

We see the RPAREN as the next token, so we need to exit early. This still won’t catch all cases (such as “a = yield + 1”

Show source
Register or log in to add new notes.