rubyx/lib/ruby/yield_statement.rb
Torsten Ruger b6c85cd4a4 callable as base for yield and send
more yield tests
2018-07-21 14:34:39 +03:00

14 lines
231 B
Ruby

module Ruby
class YieldStatement < Callable
def initialize(arguments)
super("yield_#{object_id}".to_sym , SelfExpression.new , arguments)
end
def to_s
"yield(#{arguments.join(', ')})"
end
end
end