本文整理了Java中org.jruby.Ruby.getRational
方法的一些代码示例,展示了Ruby.getRational
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Ruby.getRational
方法的具体详情如下:
包路径:org.jruby.Ruby
类名称:Ruby
方法名:getRational
暂无
代码示例来源:origin: org.jruby/jruby-core
/** rb_Rational/rb_Rational2
*
*/
public static IRubyObject newRationalConvert(ThreadContext context, IRubyObject x, IRubyObject y) {
return convert(context, context.runtime.getRational(), x, y);
}
代码示例来源:origin: org.jruby/jruby-complete
/** rb_rational_new
*
*/
public static IRubyObject newRationalCanonicalize(ThreadContext context, RubyInteger x, RubyInteger y) {
return canonicalizeInternal(context, context.runtime.getRational(), x, y);
}
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
/** rb_rational_raw
*
*/
static RubyRational newRationalRaw(Ruby runtime, IRubyObject x, IRubyObject y) {
return new RubyRational(runtime, runtime.getRational(), x, y);
}
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
/** rb_rational_new
*
*/
private static IRubyObject newRationalCanonicalize(ThreadContext context, IRubyObject x, IRubyObject y) {
return canonicalizeInternal(context, context.runtime.getRational(), x, y);
}
代码示例来源:origin: org.jruby/jruby-complete
/** rb_Rational/rb_Rational2
*
*/
public static IRubyObject newRationalConvert(ThreadContext context, IRubyObject x, IRubyObject y) {
return convert(context, context.runtime.getRational(), x, y);
}
代码示例来源:origin: org.jruby/jruby-complete
/** rb_rational_raw
*
*/
public static RubyRational newRationalRaw(Ruby runtime, IRubyObject x, IRubyObject y) {
return newRational(runtime, runtime.getRational(), x, y);
}
代码示例来源:origin: org.jruby/jruby-complete
public static IRubyObject newRationalCanonicalize(ThreadContext context, long x, long y) {
Ruby runtime = context.runtime;
return canonicalizeInternal(context, runtime.getRational(), x, y);
}
public static IRubyObject newRationalCanonicalize(ThreadContext context, long x) {
代码示例来源:origin: org.jruby/jruby-core
/** rb_rational_raw
*
*/
public static RubyRational newRationalRaw(Ruby runtime, IRubyObject x, IRubyObject y) {
return newRational(runtime, runtime.getRational(), x, y);
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
/** rb_rational_raw
*
*/
static RubyRational newRationalRaw(Ruby runtime, IRubyObject x, IRubyObject y) {
return new RubyRational(runtime, runtime.getRational(), x, y);
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
/** rb_rational_new
*
*/
private static IRubyObject newRationalCanonicalize(ThreadContext context, IRubyObject x, IRubyObject y) {
return canonicalizeInternal(context, context.runtime.getRational(), x, y);
}
代码示例来源:origin: org.jruby/jruby-core
public static IRubyObject newRationalCanonicalize(ThreadContext context, long x, long y) {
Ruby runtime = context.runtime;
return canonicalizeInternal(context, runtime.getRational(), x, y);
}
public static IRubyObject newRationalCanonicalize(ThreadContext context, long x) {
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
@JRubyMethod(name = "Rational", module = true, visibility = PRIVATE, compat = RUBY1_9)
public static IRubyObject new_rational(ThreadContext context, IRubyObject recv) {
return Helpers.invoke(context, context.runtime.getRational(), "convert");
}
@JRubyMethod(name = "Rational", module = true, visibility = PRIVATE, compat = RUBY1_9)
代码示例来源:origin: org.jruby/jruby-complete
/** rb_rational_raw1
*
*/
static RubyRational newRationalRaw(Ruby runtime, IRubyObject x) {
return newRational(runtime, runtime.getRational(), x, RubyFixnum.one(runtime));
}
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
/** rb_rational_raw1
*
*/
static RubyRational newRationalRaw(Ruby runtime, IRubyObject x) {
return new RubyRational(runtime, runtime.getRational(), x, RubyFixnum.one(runtime));
}
代码示例来源:origin: org.jruby/jruby-complete
@JRubyMethod(name = "Rational", module = true, visibility = PRIVATE)
public static IRubyObject new_rational(ThreadContext context, IRubyObject recv) {
RubyClass rational = context.runtime.getRational();
return sites(context).convert_rational.call(context, rational, rational);
}
@JRubyMethod(name = "Rational", module = true, visibility = PRIVATE)
代码示例来源:origin: org.jruby/jruby-core
@JRubyMethod(name = "Rational", module = true, visibility = PRIVATE)
public static IRubyObject new_rational(ThreadContext context, IRubyObject recv, IRubyObject arg0, IRubyObject arg1) {
RubyClass rational = context.runtime.getRational();
return sites(context).convert_rational.call(context, rational, rational, arg0, arg1);
}
代码示例来源:origin: org.jruby/jruby-complete
@JRubyMethod(name = "Rational", module = true, visibility = PRIVATE)
public static IRubyObject new_rational(ThreadContext context, IRubyObject recv, IRubyObject arg0) {
RubyClass rational = context.runtime.getRational();
return sites(context).convert_rational.call(context, rational, rational, arg0);
}
@JRubyMethod(name = "Rational", module = true, visibility = PRIVATE)
代码示例来源:origin: org.jruby/jruby-complete
@JRubyMethod(name = "Rational", module = true, visibility = PRIVATE)
public static IRubyObject new_rational(ThreadContext context, IRubyObject recv, IRubyObject arg0, IRubyObject arg1) {
RubyClass rational = context.runtime.getRational();
return sites(context).convert_rational.call(context, rational, rational, arg0, arg1);
}
代码示例来源:origin: org.jruby/jruby-core
@JRubyMethod(name = "Rational", module = true, visibility = PRIVATE)
public static IRubyObject new_rational(ThreadContext context, IRubyObject recv) {
RubyClass rational = context.runtime.getRational();
return sites(context).convert_rational.call(context, rational, rational);
}
@JRubyMethod(name = "Rational", module = true, visibility = PRIVATE)
代码示例来源:origin: org.jruby/jruby-complete
public static RubyRational newRational(Ruby runtime, long x, long y) {
RubyRational rat = new RubyRational(runtime, runtime.getRational(), runtime.newFixnum(x), runtime.newFixnum(y));
rat.setFrozen(true);
return rat;
}
内容来源于网络,如有侵权,请联系作者删除!