Package org.jruby

Examples of org.jruby.Ruby.secure()


        "emacs_editing_mode",
        "filename_quote_characters", "filename_quote_characters=",
        "vi_editing_mode"}, frame = true, module = true, visibility = PRIVATE)
    public static IRubyObject unimplemented(ThreadContext context, IRubyObject recv) {
        Ruby runtime = context.getRuntime();
        runtime.secure(4);
        String err = context.getFrameName() + "() function is unimplemented on this machine";
        throw runtime.newNotImplementedError(err);
    }

    @JRubyMethod(name = {
View Full Code Here


        "filename_quote_characters", "filename_quote_characters=",
        "vi_editing_mode", "vi_editing_mode?",
        "set_screen_size"}, frame = true, module = true, visibility = PRIVATE, compat = RUBY1_9)
    public static IRubyObject unimplemented19(ThreadContext context, IRubyObject recv) {
        Ruby runtime = context.getRuntime();
        runtime.secure(4);
        String err = context.getFrameName() + "() function is unimplemented on this machine";
        throw runtime.newNotImplementedError(err);
    }

    @JRubyMethod(name = "completion_case_fold", module = true, visibility = PRIVATE)
View Full Code Here

    }

    @JRubyMethod(name = "completion_case_fold", module = true, visibility = PRIVATE)
    public static IRubyObject s_get_completion_case_fold(ThreadContext context, IRubyObject recv) {
        Ruby runtime = context.getRuntime();
        runtime.secure(4);
        return COMPLETION_CASE_FOLD;
    }

    @JRubyMethod(name = "completion_case_fold=", required = 1, module = true, visibility = PRIVATE)
    // FIXME: this is really a noop
View Full Code Here

    @JRubyMethod(name = "completion_case_fold=", required = 1, module = true, visibility = PRIVATE)
    // FIXME: this is really a noop
    public static IRubyObject s_set_completion_case_fold(ThreadContext context, IRubyObject recv,
            IRubyObject other) {
        Ruby runtime = context.getRuntime();
        runtime.secure(4);
        return COMPLETION_CASE_FOLD = other;
    }

    @JRubyMethod(name = "get_screen_size", module = true, visibility = PRIVATE, compat = RUBY1_9)
    public static IRubyObject s_get_screen_size(ThreadContext context, IRubyObject recv) {
View Full Code Here

    }

    @JRubyMethod(name = "get_screen_size", module = true, visibility = PRIVATE, compat = RUBY1_9)
    public static IRubyObject s_get_screen_size(ThreadContext context, IRubyObject recv) {
        Ruby runtime = context.getRuntime();
        runtime.secure(4);
        ConsoleHolder holder = getHolder(runtime);
        IRubyObject[] ary = new IRubyObject[2];
        ary[0] = runtime.newFixnum(holder.readline.getTermheight());
        ary[1] = runtime.newFixnum(holder.readline.getTermwidth());
        return RubyArray.newArray(runtime, ary);
View Full Code Here

    }

    @JRubyMethod(name = "line_buffer", module = true, visibility = PRIVATE, compat = RUBY1_9)
    public static IRubyObject s_get_line_buffer(ThreadContext context, IRubyObject recv) {
        Ruby runtime = context.getRuntime();
        runtime.secure(4);
        ConsoleHolder holder = getHolder(runtime);
        if (holder.readline == null) {
            initReadline(runtime, holder);
        }
        CursorBuffer cb = holder.readline.getCursorBuffer();
View Full Code Here

    }

    @JRubyMethod(name = "point", module = true, visibility = PRIVATE, compat = RUBY1_9)
    public static IRubyObject s_get_point(ThreadContext context, IRubyObject recv) {
        Ruby runtime = context.getRuntime();
        runtime.secure(4);
        ConsoleHolder holder = getHolder(runtime);
        if (holder.readline == null) {
            initReadline(runtime, holder);
        }
        CursorBuffer cb = holder.readline.getCursorBuffer();
View Full Code Here

    }

    @JRubyMethod(name = "refresh_line", module = true, visibility = PRIVATE, compat = RUBY1_9)
    public static IRubyObject s_refresh_line(ThreadContext context, IRubyObject recv) {
        Ruby runtime = context.getRuntime();
        runtime.secure(4);
        ConsoleHolder holder = getHolder(runtime);
        try {
            holder.readline.redrawLine(); // not quite the same as rl_refresh_line()
        } catch (IOException ioe) {
            throw runtime.newIOErrorFromException(ioe);
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.