}
@JRubyMethod(name = "p", rest = true, module = true, visibility = PRIVATE)
public static IRubyObject p(ThreadContext context, IRubyObject recv, IRubyObject[] args) {
Ruby runtime = context.getRuntime();
IRubyObject defout = runtime.getGlobalVariables().get("$>");
for (int i = 0; i < args.length; i++) {
if (args[i] != null) {
defout.callMethod(context, "write", RubyObject.inspect(context, args[i]));
defout.callMethod(context, "write", runtime.newString("\n"));
}
}
IRubyObject result = runtime.getNil();
if (runtime.getInstanceConfig().getCompatVersion() == CompatVersion.RUBY1_9) {
if (args.length == 1) {
result = args[0];
} else if (args.length > 1) {
result = runtime.newArray(args);