blob: b367400cf76e417dde12c81393f95ae9c1988351 [file] [log] [blame] [raw]
package li.cil.oc.util
import scala.math.ScalaNumber
object ResultWrapper {
def result(args: Any*): Array[AnyRef] = {
def unwrap(arg: Any): AnyRef = arg match {
case x: ScalaNumber => x.underlying
case x => x.asInstanceOf[AnyRef]
}
Array(args map unwrap: _*)
}
}