本文整理了Java中org.jruby.Ruby.getBignum
方法的一些代码示例,展示了Ruby.getBignum
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Ruby.getBignum
方法的具体详情如下:
包路径:org.jruby.Ruby
类名称:Ruby
方法名:getBignum
暂无
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
public RubyBignum(Ruby runtime, BigInteger value) {
super(runtime, runtime.getBignum());
this.value = value;
}
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
public RubyBignum(Ruby runtime, BigInteger value) {
super(runtime, runtime.getBignum());
this.value = value;
}
代码示例来源:origin: org.jruby/jruby-complete
public RubyBignum(Ruby runtime, BigInteger value) {
super(runtime, runtime.getBignum());
this.value = value;
setFrozen(true);
}
代码示例来源:origin: org.jruby/jruby-core
public RubyBignum(Ruby runtime, BigInteger value) {
super(runtime, runtime.getBignum());
this.value = value;
setFrozen(true);
}
代码示例来源:origin: org.jruby/jruby-complete
@JRubyMethod()
public IRubyObject marshal_load(ThreadContext context, IRubyObject arg) {
RubyArray load = arg.convertToArray();
if (load.size() != 3) {
throw context.runtime.newArgumentError("wrong dump data");
}
if (!(load.eltInternal(0) instanceof RubyBignum)) {
throw context.runtime.newTypeError(load.eltInternal(0), context.runtime.getBignum());
}
RubyBignum state = (RubyBignum) load.eltInternal(0);
int left = RubyNumeric.num2int(load.eltInternal(1));
IRubyObject seed = load.eltInternal(2);
random = new RandomType(seed, state, left);
if (load.hasVariables()) {
syncVariables((IRubyObject) load);
}
return this;
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
@JRubyMethod(compat = RUBY1_9)
public IRubyObject marshal_load(ThreadContext context, IRubyObject arg) {
RubyArray load = arg.convertToArray();
if (load.size() != 3) {
throw context.runtime.newArgumentError("wrong dump data");
}
if (!(load.eltInternal(0) instanceof RubyBignum)) {
throw context.runtime.newTypeError(load.eltInternal(0), context.runtime.getBignum());
}
RubyBignum state = (RubyBignum) load.eltInternal(0);
int left = RubyNumeric.num2int(load.eltInternal(1));
IRubyObject seed = load.eltInternal(2);
random = new RandomType(seed, state, left);
if (load.hasVariables()) {
syncVariables((IRubyObject) load);
}
return this;
}
代码示例来源:origin: org.jruby/jruby-core
@JRubyMethod()
public IRubyObject marshal_load(ThreadContext context, IRubyObject arg) {
RubyArray load = arg.convertToArray();
if (load.size() != 3) {
throw context.runtime.newArgumentError("wrong dump data");
}
if (!(load.eltInternal(0) instanceof RubyBignum)) {
throw context.runtime.newTypeError(load.eltInternal(0), context.runtime.getBignum());
}
RubyBignum state = (RubyBignum) load.eltInternal(0);
int left = RubyNumeric.num2int(load.eltInternal(1));
IRubyObject seed = load.eltInternal(2);
random = new RandomType(seed, state, left);
if (load.hasVariables()) {
syncVariables((IRubyObject) load);
}
return this;
}
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
@JRubyMethod(compat = RUBY1_9)
public IRubyObject marshal_load(ThreadContext context, IRubyObject arg) {
RubyArray load = arg.convertToArray();
if (load.size() != 3) {
throw context.runtime.newArgumentError("wrong dump data");
}
if (!(load.eltInternal(0) instanceof RubyBignum)) {
throw context.runtime.newTypeError(load.eltInternal(0), context.runtime.getBignum());
}
RubyBignum state = (RubyBignum) load.eltInternal(0);
int left = RubyNumeric.num2int(load.eltInternal(1));
IRubyObject seed = load.eltInternal(2);
random = new RandomType(seed, state, left);
if (load.hasVariables()) {
syncVariables((IRubyObject) load);
}
return this;
}
代码示例来源:origin: org.jruby/yecht
obj = target_class.callMethod(ctx, "yaml_new", new IRubyObject[]{subclass, type, val});
} else if(!target_class.isNil()) {
if(subclass == runtime.getBignum()) {
obj = RubyNumeric.str2inum(runtime, val.convertToString(), 10);
} else {
内容来源于网络,如有侵权,请联系作者删除!