org.jruby.Ruby.getBignum()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(3.6k)|赞(0)|评价(0)|浏览(150)

本文整理了Java中org.jruby.Ruby.getBignum方法的一些代码示例,展示了Ruby.getBignum的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Ruby.getBignum方法的具体详情如下:
包路径:org.jruby.Ruby
类名称:Ruby
方法名:getBignum

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 {

相关文章

Ruby类方法