Bugs: Browse | Submit New | Admin

[#29717] ruby -w outputs gnuplot data to STDOUT instead of STDERR

Date:
2013-02-22 12:30
Priority:
3
Submitted By:
Martin Hansen (maasha)
Assigned To:
Nobody (None)
Category:
None
State:
Open
Summary:
ruby -w outputs gnuplot data to STDOUT instead of STDERR

Detailed description
I have discovered this annoying issue when using rgplot from a ruby script with warnings enabled. The problem is that
the gnuplot data is printed to stdout if warnings are turned on - and this breaks my pipeline (piping data on a bash
command line). I think it would be fair that this data should be printed to stderr instead.

This is the offending line:

./lib/gnuplot.rb:      puts "writing this to gnuplot:\n" + to_gplot + "\n" if $VERBOSE

I suggest

$stderr.puts "writing this to gnuplot:\n" + to_gplot + "\n" if $VERBOSE

Cheers and thanks for an awesome gem!

Add A Comment: Notepad

Please login


Followup

No Followups Have Been Posted

Attached Files:

Name Description Download
No Files Currently Attached

Changes:

No Changes Have Been Made to This Item