Temporary tag for this failure. Updated CI spec coming.
[rbx.git] / kernel / core / delegated_method.rb
blobd220ed934c72752c1267a5a240d62364fbec5046
1 # depends on: class.rb
3 class DelegatedMethod < RuntimePrimitive
5   Receiver = 5
6   UseSelf = 6
8   self.instance_fields = 7
10   def name= n; @name = n end
11   def name; @name end
12   
13   def self.build(sym, receiver, pass_self)
14     obj = allocate()
15     obj.name = "<delegated to: #{receiver.to_s}>"
16     obj.put RuntimePrimitive::PrimitiveIndex, :dispatch_as_method
17     obj.put RuntimePrimitive::RequiredArguments, -1
18     obj.put RuntimePrimitive::SerialNumber, 0
19     obj.put RuntimePrimitive::ByteCodes, sym
20     obj.put Receiver, receiver
21     obj.put UseSelf, pass_self # If true, first argument will be 'self'
22     return obj
23   end
24 end