Пример #1
0
    @Specialization
    public Object send(RubyBasicObject self, Object[] args, RubyProc block) {
      notDesignedForCompilation();

      final String name = args[0].toString();
      final Object[] sendArgs = Arrays.copyOfRange(args, 1, args.length);
      return self.send(name, block, sendArgs);
    }
Пример #2
0
    @Specialization
    public Object send(
        RubyBasicObject self,
        Object[] args,
        @SuppressWarnings("unused") UndefinedPlaceholder block) {
      notDesignedForCompilation();

      final String name = args[0].toString();
      final Object[] sendArgs = Arrays.copyOfRange(args, 1, args.length);
      return self.send(name, null, sendArgs);
    }
Пример #3
0
 private Object methodMissing(
     RubyBasicObject self, RubySymbol name, Object[] args, RubyProc block) {
   throw new RaiseException(
       getContext().getCoreLibrary().nameErrorNoMethod(name.toString(), self.toString()));
 }