Examples of convertToInteger()


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

                new ImplicitTuple(plain.isTrue(),
                quoted.isTrue()),
                value.asJavaString(),
                NULL_MARK,
                NULL_MARK,
                SCALAR_STYLES[(int)style.convertToInteger().getLongValue()]);
        emit(context, event);
        return this;
    }

    @JRubyMethod(required = 4)
View Full Code Here

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

                anchor.isNil() ? null : anchor.asJavaString(),
                tag.isNil() ? null : tag.asJavaString(),
                implicit.isTrue(),
                NULL_MARK,
                NULL_MARK,
                SEQUENCE_BLOCK != style.convertToInteger().getLongValue());
        emit(context, event);
        return this;
    }

    @JRubyMethod
View Full Code Here

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

                anchor.isNil() ? null : anchor.asJavaString(),
                tag.isNil() ? null : tag.asJavaString(),
                implicit.isTrue(),
                NULL_MARK,
                NULL_MARK,
                MAPPING_BLOCK != style.convertToInteger().getLongValue());
        emit(context, event);
        return this;
    }

    @JRubyMethod
View Full Code Here

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

                Service service = Service.getServiceByName(_port.asJavaString(), "udp");

                if (service != null) {
                    port = service.getPort();
                } else {
                    port = (int)_port.convertToInteger("to_i").getLongValue();
                }

            } else {
                port = (int)_port.convertToInteger().getLongValue();
            }
View Full Code Here

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

                } else {
                    port = (int)_port.convertToInteger("to_i").getLongValue();
                }

            } else {
                port = (int)_port.convertToInteger().getLongValue();
            }

            InetAddress address = SocketUtils.getRubyInetAddress(nameStr.getByteList());
            InetSocketAddress addr = new InetSocketAddress(address, port);
View Full Code Here

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

                long nanos = nano_num.convertToInteger().getLongValue() / nano_den.convertToInteger().getLongValue();
                time.nsec += nanos;
            }

            if (offset != null) {
                long tz = offset.convertToInteger().getLongValue();
                time.dt = dt.withZone(DateTimeZone.forOffsetMillis((int)(tz * 1000)));
            }
        }
        return time;
    }
View Full Code Here

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

            // check for trailing options hash and prepare it
            if (!opts.isNil()) {
                RubyHash options = (RubyHash)opts;
                IRubyObject optsMode = options.delete(context, runtime.newSymbol("mode"), Block.NULL_BLOCK);
                if (!optsMode.isNil()) {
                    mode |= optsMode.convertToInteger().getIntValue();
                }
                options.op_aset(context, runtime.newSymbol("perm"), perm);
            } else {
                opts = perm;
            }
View Full Code Here

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

                Service service = Service.getServiceByName(_port.asJavaString(), "udp");

                if (service != null) {
                    port = service.getPort();
                } else {
                    port = (int)_port.convertToInteger("to_i").getLongValue();
                }

            } else {
                port = (int)_port.convertToInteger().getLongValue();
            }
View Full Code Here

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

                } else {
                    port = (int)_port.convertToInteger("to_i").getLongValue();
                }

            } else {
                port = (int)_port.convertToInteger().getLongValue();
            }

            InetAddress address = SocketUtils.getRubyInetAddress(nameStr.getByteList());
            InetSocketAddress addr = new InetSocketAddress(address, port);
View Full Code Here

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

        if (arg instanceof RubyRange) {
            return randomRand(context, arg, random);
        }

        RubyInteger max = arg.convertToInteger();
        return randCommon(context, random, max);
    }

    // c: rb_f_rand for 1.8
    public static IRubyObject randCommon18(ThreadContext context, IRubyObject recv,
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.