This language bar is your friend. Select your favorite languages!
Edit summary for version 16 :

Version 15

Version 16

Idiom #59 Write to standard error stream

Print the message "x is negative" to standard error (stderr), with integer x value substitution (e.g. "-2 is negative").

Idiom #59 Write to standard error stream

Print the message "x is negative" to standard error (stderr), with integer x value substitution (e.g. "-2 is negative").

Code
warn "#{x} is negative"
$stderr.puts "%d is negative" % x
Doc URL
http://ruby-doc.org/core-2.2.3/Kernel.html#method-i-warn