org.jruby.RubyHash.to_a()方法的使用及代码示例

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

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

RubyHash.to_a介绍

[英]rb_hash_to_a
[中]rb_hash_to_a

代码示例

代码示例来源:origin: org.jruby/jruby-complete

@Override
public RubyArray to_a() {
  syncSize();
  return super.to_a();
}

代码示例来源:origin: org.jruby/jruby-core

@Override
public RubyArray to_a() {
  syncSize();
  return super.to_a();
}

代码示例来源:origin: org.jruby/jruby-complete

@Deprecated
public IRubyObject sort(ThreadContext context, Block block) {
  return to_a().sort_bang(context, block);
}

代码示例来源:origin: org.jruby/jruby-core

@Deprecated
public IRubyObject sort(ThreadContext context, Block block) {
  return to_a().sort_bang(context, block);
}

代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby

/** rb_hash_sort
 *
 */
@JRubyMethod
public IRubyObject sort(ThreadContext context, Block block) {
  return to_a().sort_bang(context, block);
}

代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby

@JRubyMethod(name = "flatten", compat = RUBY1_9)
public IRubyObject flatten(ThreadContext context, IRubyObject level) {
  RubyArray ary = to_a();
  ary.callMethod(context, "flatten!", level);
  return ary;
}

代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby

/** rb_hash_sort
 *
 */
@JRubyMethod
public IRubyObject sort(ThreadContext context, Block block) {
  return to_a().sort_bang(context, block);
}

代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby

@JRubyMethod(name = "flatten", compat = RUBY1_9)
public IRubyObject flatten(ThreadContext context, IRubyObject level) {
  RubyArray ary = to_a();
  ary.callMethod(context, "flatten!", level);
  return ary;
}

代码示例来源:origin: org.jruby/jruby-complete

@JRubyMethod
public IRubyObject flatten(ThreadContext context, IRubyObject level) {
  RubyArray ary = to_a();
  sites(context).flatten_bang.call(context, ary, ary, level);
  return ary;
}

代码示例来源:origin: org.jruby/jruby-core

@JRubyMethod
public IRubyObject flatten(ThreadContext context, IRubyObject level) {
  RubyArray ary = to_a();
  sites(context).flatten_bang.call(context, ary, ary, level);
  return ary;
}

代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby

@JRubyMethod(name = "flatten", compat = RUBY1_9)
public IRubyObject flatten(ThreadContext context) {
  RubyArray ary = to_a();
  ary.callMethod(context, "flatten!", RubyFixnum.one(context.runtime));
  return ary;
}

代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby

@JRubyMethod(name = "flatten", compat = RUBY1_9)
public IRubyObject flatten(ThreadContext context) {
  RubyArray ary = to_a();
  ary.callMethod(context, "flatten!", RubyFixnum.one(context.runtime));
  return ary;
}

代码示例来源:origin: org.jruby/jruby-complete

@JRubyMethod
public IRubyObject flatten(ThreadContext context) {
  RubyArray ary = to_a();
  sites(context).flatten_bang.call(context, ary, ary, RubyFixnum.one(context.runtime));
  return ary;
}

代码示例来源:origin: org.jruby/jruby-core

@JRubyMethod
public IRubyObject flatten(ThreadContext context) {
  RubyArray ary = to_a();
  sites(context).flatten_bang.call(context, ary, ary, RubyFixnum.one(context.runtime));
  return ary;
}

代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby

/** rb_hash_to_s & to_s_hash
 *
 */
@JRubyMethod(name = "to_s")
public IRubyObject to_s(ThreadContext context) {
  Ruby runtime = context.runtime;
  if (runtime.isInspecting(this)) return runtime.newString("{...}");
  try {
    runtime.registerInspecting(this);
    return to_a().to_s();
  } finally {
    runtime.unregisterInspecting(this);
  }
}

代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby

/** rb_hash_to_s & to_s_hash
 *
 */
@JRubyMethod(name = "to_s")
public IRubyObject to_s(ThreadContext context) {
  Ruby runtime = context.runtime;
  if (runtime.isInspecting(this)) return runtime.newString("{...}");
  try {
    runtime.registerInspecting(this);
    return to_a().to_s();
  } finally {
    runtime.unregisterInspecting(this);
  }
}

相关文章

微信公众号

最新文章

更多

RubyHash类方法