class SyntaxTree::YARV::PutString

### Summary

‘putstring` pushes an unfrozen string literal onto the stack.

### Usage

~~~ruby “foo” ~~~

Attributes

object[R]

Public Class Methods

new(object) click to toggle source
# File lib/syntax_tree/yarv/instructions.rb, line 4775
def initialize(object)
  @object = object
end

Public Instance Methods

==(other) click to toggle source
# File lib/syntax_tree/yarv/instructions.rb, line 4791
def ==(other)
  other.is_a?(PutString) && other.object == object
end
call(vm) click to toggle source
# File lib/syntax_tree/yarv/instructions.rb, line 4803
def call(vm)
  vm.push(object.dup)
end
deconstruct_keys(_keys) click to toggle source
# File lib/syntax_tree/yarv/instructions.rb, line 4787
def deconstruct_keys(_keys)
  { object: object }
end
disasm(fmt) click to toggle source
# File lib/syntax_tree/yarv/instructions.rb, line 4779
def disasm(fmt)
  fmt.instruction("putstring", [fmt.object(object)])
end
length() click to toggle source
# File lib/syntax_tree/yarv/instructions.rb, line 4795
def length
  2
end
pushes() click to toggle source
# File lib/syntax_tree/yarv/instructions.rb, line 4799
def pushes
  1
end
to_a(_iseq) click to toggle source
# File lib/syntax_tree/yarv/instructions.rb, line 4783
def to_a(_iseq)
  [:putstring, object]
end