rubyx/lib/parfait/block.rb
Torsten Rüger 66c2adda20 Copy risc compiler stuff to mom
Start to separate the layers. 
wip, just checkin in to see the following changes better
2019-08-06 18:33:27 +03:00

23 lines
566 B
Ruby

module Parfait
# A Block is a callable object, much like a CallableMethod.
# Surprisingly similar in fact, as the block is really only missing the name.
#
# The difference lies mostly in the way they are compiled (scope and return)
#
# Also both have a list of blocks defined in their scope. But this is
# not implemented for blocks yet
#
class Block < Callable
def ==(other)
return false unless other.is_a?(Block)
super
end
def inspect
"#{self_type.object_class.name}(#{arguments_type.inspect})"
end
end
end