Skip to content

Instantly share code, notes, and snippets.

@mokus80
Created September 11, 2013 10:53
Show Gist options
  • Save mokus80/6522042 to your computer and use it in GitHub Desktop.
Save mokus80/6522042 to your computer and use it in GitHub Desktop.
class HashNode < Node
attr_reader :array
def initialize(filename, line, array)
super
@array = array
end
def bytecode(g)
pos(g)
array.each do |element|
element.bytecode(g)
end
g.push_cpath_top
g.find_constant(array)
g.dup_top
g.send([], 2)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment