org.jruby.ast.util
Class ArgsUtil
java.lang.Object
org.jruby.ast.util.ArgsUtil
public final class ArgsUtil
- extends java.lang.Object
- Author:
- jpetersen
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ArgsUtil
public ArgsUtil()
convertToJavaArray
public static IRubyObject[] convertToJavaArray(IRubyObject value)
convertToRubyArray
public static RubyArray convertToRubyArray(Ruby runtime,
IRubyObject value,
boolean coerce)
- This name may be a bit misleading, since this also attempts to coerce
array behavior using to_ary.
- Parameters:
runtime
- The JRuby runtimevalue
- The value to convertcoerce
- Whether to coerce using to_ary or just wrap with an array
convertToRubyArrayWithCoerce
public static RubyArray convertToRubyArrayWithCoerce(Ruby runtime,
IRubyObject value)
popArray
public static IRubyObject[] popArray(IRubyObject[] array)
- Remove first element from array
- Parameters:
array
- to have first element "popped" off
- Returns:
- all but first element of the supplied array
arrayLength
public static int arrayLength(IRubyObject node)
Copyright © 2002-2009 JRuby Team. All Rights Reserved.