Skip to content

"print" called with no arguments prints "nil" #1167

Closed
bobjalex opened this Issue Oct 25, 2013 · 1 comment

2 participants

@bobjalex

Prints "nil" when no arguments provided. Works fine when >0 args are provided.

C-Ruby prints nothing when no args.

Using version 1.7.6, Windows Vista 32-bit.

jruby -e print
nil

jruby -e "print(*[])"
nil

jruby -e "print(123)"
123

ruby -e print

ruby -e "print(*[])"

I found this due to a mistake in my program -- not sure why anyone would code this on purpose. :-)
Does this set a record for the most trivial bug yet??

@enebo
JRuby Team member
enebo commented Oct 26, 2013

It is really unlikely to ever break anything but it was simple to fix. You might have discovered the most trivial bug but thanks for reporting it nonetheless :)

@enebo enebo closed this Oct 26, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.