Package org.jruby.runtime.builtin

Examples of org.jruby.runtime.builtin.IRubyObject.inspect()


            } else if (receiver == attached) {
                buf.append(attached.inspect().toString());
                delimeter = '.';
            } else {
                buf.append(receiver.inspect().toString());
                buf.append('(').append(attached.inspect().toString()).append(')');
                delimeter = '.';
            }
        } else {
            buf.append(originModule.getName());
           
View Full Code Here


            script = asciize(script);
            IRubyObject evalScriptlet = interpreter.evalScriptlet(script, interpreter.getCurrentContext().getCurrentScope());
            if (evalScriptlet instanceof RubyString)
                return RubyScriptModel.inspect(evalScriptlet.toString());
            else
                return evalScriptlet.inspect().toString();
        } catch (Throwable t) {
            System.err.println("Script:");
            System.err.println(script);
            t.printStackTrace();
        }
View Full Code Here

        long[] tuple;

        try {
            IRubyObject lastArg = args[args.length - 1];
            if (lastArg instanceof RubyHash) {
                runtime.getWarnings().warn(ID.UNSUPPORTED_SUBPROCESS_OPTION, "system does not support options in JRuby yet: " + lastArg.inspect());
                args = Arrays.copyOf(args, args.length - 1);
            }
            if (! Platform.IS_WINDOWS && args[args.length -1].asJavaString().matches(".*[^&]&\\s*")) {
                // looks like we need to send process to the background
                ShellLauncher.runWithoutWait(runtime, args);
View Full Code Here

        if (implementationModule.isSingleton()) {
            IRubyObject attached = ((MetaClass) implementationModule).getAttached();
            if (receiver == null) {
                buf.append(implementationModule.inspect().toString());
            } else if (receiver == attached) {
                buf.append(attached.inspect().toString());
                delimeter = '.';
            } else {
                buf.append(receiver.inspect().toString());
                buf.append('(').append(attached.inspect().toString()).append(')');
                delimeter = '.';
View Full Code Here

            } else if (receiver == attached) {
                buf.append(attached.inspect().toString());
                delimeter = '.';
            } else {
                buf.append(receiver.inspect().toString());
                buf.append('(').append(attached.inspect().toString()).append(')');
                delimeter = '.';
            }
        } else {
            buf.append(originModule.getName());
           
View Full Code Here

        if(isSingleton()){           
            IRubyObject attached = ((MetaClass)this).getAttached();
            StringBuilder buffer = new StringBuilder("#<Class:");
            if (attached != null) { // FIXME: figure out why we getService null sometimes
                if(attached instanceof RubyClass || attached instanceof RubyModule){
                    buffer.append(attached.inspect());
                }else{
                    buffer.append(attached.anyToString());
                }
            }
            buffer.append(">");
View Full Code Here

                err.setException( new ServiceException( "'nil' was returned from the app" ) );
                return err;
            }
            if( callResult.getType().toString().equals( "Rack::File" ) )
            {
                RubyObject.puts( callResult.inspect() );
                // TODO: return a file-based response
                Response err = new Response( request );
                err.setException( new ServiceException( "body is a Rack::File - need to handle it differently" ) );
                return err;
            }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.