@RubyLevelMethod(name = "method_missing", module = true)
 public static RubyValue methodMissing(RubyValue receiver, RubyArray args) {
   RubySymbol method_name = (RubySymbol) args.get(0);
   RubyClass klass = receiver.getRubyClass();
   klass = (klass != null) ? klass.getRealClass() : null;
   throw new RubyException(
       RubyRuntime.NoMethodErrorClass,
       "undefined method '" + method_name.toString() + "' for " + klass.getName());
 }
Ejemplo n.º 2
0
 private Object methodMissing(
     RubyBasicObject self, RubySymbol name, Object[] args, RubyProc block) {
   throw new RaiseException(
       getContext().getCoreLibrary().nameErrorNoMethod(name.toString(), self.toString()));
 }