Skip to content

Instantly share code, notes, and snippets.

@goyox86
Created November 11, 2010 22:43
Show Gist options
  • Save goyox86/673363 to your computer and use it in GitHub Desktop.
Save goyox86/673363 to your computer and use it in GitHub Desktop.
class ArrayLiteral : Rubinius AST ArrayLiteral {
def initialize: @array line: line {
@array nil? if_true: { @array = [] }
initialize(line, @array)
}
def bytecode: g { bytecode(g) }
}
@vic
Copy link

vic commented Nov 11, 2010

As you said, it'd be cool to have line as first line argument, so the method should read

def initialize: line array: @array ([]) {
initialize(line, @array)
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment