Sha256: 7fa27282fd2c67886c43474feeecff357a964413508fae8e949163fb6faed6c5
Contents?: true
Size: 682 Bytes
Versions: 3
Compression:
Stored size: 682 Bytes
Contents
# pops the top 2 items of the +:int+ stack; # pushes the top item down "into" the +:int+ stack, at a level determined by the second value. # # If the destination value is negative or 0, the item stays on top; # if the destination value is greater than or equal to the depth of the stack, the item goes to the bottom; # otherwise, the item is inserted farther from the stack's top as the destination value increases. # # note: the destination depth is calculated after the items have been popped # # *needs:* 2 +:int+ # # *pushes:* 1 +:int+ (sortof) # class IntShoveInstruction < Instruction include ShoveInstruction def initialize(context) super(context, :int) end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
nudge-0.2.9 | lib/instructions/int/int_shove.rb |
nudge-0.2.8 | lib/instructions/int/int_shove.rb |
nudge-0.2.7 | lib/instructions/int/int_shove.rb |