Package org.jruby.truffle.runtime.control

Examples of org.jruby.truffle.runtime.control.RaiseException


        @Specialization
        public RubyBasicObject allocate(RubyClass rubyClass) {
            if (rubyClass.isSingleton()) {
                CompilerDirectives.transferToInterpreter();
                throw new RaiseException(getContext().getCoreLibrary().typeError("can't create instance of singleton class", this));
            }
            return rubyClass.newInstance(this);
        }
View Full Code Here


        RubyMethod method = deepMethodSearch(oldName);

        if (method == null) {
            CompilerDirectives.transferToInterpreter();
            throw new RaiseException(getContext().getCoreLibrary().noMethodError(oldName, getName(), currentNode));
        }

        addMethod(currentNode, method.withNewName(newName));
    }
View Full Code Here

        if (rubyConstant != null) {
            rubyConstant.setPrivate(isPrivate);
            newLexicalVersion();
        } else {
            throw new RaiseException(context.getCoreLibrary().nameErrorUninitializedConstant(this, constant.toString(), currentNode));
        }
    }
View Full Code Here

        } finally {
            getContext().getThreadManager().enterGlobalLock(runningThread);
        }

        if (exception != null) {
            throw new RaiseException(exception);
        }
    }
View Full Code Here

        public RubyModule undefMethod(RubyClass rubyClass, RubyString name) {
            notDesignedForCompilation();

            final RubyMethod method = ModuleOperations.lookupMethod(rubyClass, name.toString());
            if (method == null) {
                throw new RaiseException(getContext().getCoreLibrary().noMethodError(name.toString(), rubyClass.toString(), this));
            }
            rubyClass.undefMethod(this, method);
            return rubyClass;
        }
View Full Code Here

        public RubyModule undefMethod(RubyClass rubyClass, RubySymbol name) {
            notDesignedForCompilation();

            final RubyMethod method = ModuleOperations.lookupMethod(rubyClass, name.toString());
            if (method == null) {
                throw new RaiseException(getContext().getCoreLibrary().noMethodError(name.toString(), rubyClass.toString(), this));
            }
            rubyClass.undefMethod(this, method);
            return rubyClass;
        }
View Full Code Here

        public RubyModule undefMethod(RubyModule module, RubyString name) {
            notDesignedForCompilation();

            final RubyMethod method = ModuleOperations.lookupMethod(module, name.toString());
            if (method == null) {
                throw new RaiseException(getContext().getCoreLibrary().noMethodError(name.toString(), module.toString(), this));
            }
            module.undefMethod(this, method);
            return module;
        }
View Full Code Here

        public RubyModule undefMethod(RubyModule module, RubySymbol name) {
            notDesignedForCompilation();

            final RubyMethod method = ModuleOperations.lookupMethod(module, name.toString());
            if (method == null) {
                throw new RaiseException(getContext().getCoreLibrary().noMethodError(name.toString(), module.toString(), this));
            }
            module.undefMethod(this, method);
            return module;
        }
View Full Code Here

        @Specialization
        public Object isSubclassOf(VirtualFrame frame, RubyModule self, RubyBasicObject other) {
            notDesignedForCompilation();

            throw new RaiseException(getContext().getCoreLibrary().typeError("compared with non class/module", this));
        }
View Full Code Here

        @Specialization
        public Object classEval(RubyModule self, UndefinedPlaceholder code, UndefinedPlaceholder file, UndefinedPlaceholder line, UndefinedPlaceholder block) {
            notDesignedForCompilation();

            throw new RaiseException(getContext().getCoreLibrary().argumentError(0, 1, 2, this));
        }
View Full Code Here

TOP

Related Classes of org.jruby.truffle.runtime.control.RaiseException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.