Bugs: Browse | Submit New | Admin

[#12077] Gnuplot::Plot [] method fail mode

Date:
2007-07-07 18:36
Priority:
3
Submitted By:
Nobody
Assigned To:
Nobody (None)
Category:
None
State:
Open
Summary:
Gnuplot::Plot [] method fail mode

Detailed description
The [] method for the Gnuplot::Plot class fails when the variable being requested for does not exist in the @sets
array.


Gnuplot::Plot [] method

def [] ( var )
  v = @sets.assoc( var )
  v[1] || nil
end


'v' will be assigned 'nil' if 'var' is not found in @sets.  Then and undefined method `[]' error will be thrown when
v[1] is invoked since nil does not have a [] method.

Add A Comment: Notepad

Please login


Followup

Message
Date: 2009-07-16 13:02
Sender: Roger Pack

if this is still a problem could you file an issue
at http://github.com/rogerdpack/ruby_gnuplot/tree/master ? (though
not the original creator, I'm going to upkeep a maintained branch
there).
Thanks

Attached Files:

Name Description Download
No Files Currently Attached

Changes:

No Changes Have Been Made to This Item