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: _*) | |
} | |
} |