Exemple #1
0
    @Specialization
    public RubyRegexp initialize(RubyRegexp regexp, RubyRegexp from) {
      notDesignedForCompilation();

      regexp.initialize(this, from.getSource()); // TODO: is copying needed?
      return regexp;
    }
Exemple #2
0
    @Specialization
    public RubyRegexp initialize(RubyRegexp regexp, RubyString string) {
      notDesignedForCompilation();

      regexp.initialize(this, string.getBytes());
      return regexp;
    }
Exemple #3
0
    @Specialization
    public Object initializeCopy(RubyRegexp self, RubyRegexp from) {
      notDesignedForCompilation();

      if (self == from) {
        return self;
      }

      self.initialize(this, from.getSource()); // TODO: is copying needed?

      return self;
    }