lib/coderunner/class_methods.rb in coderunner-0.12.6 vs lib/coderunner/class_methods.rb in coderunner-0.12.7

- old
+ new

@@ -567,12 +567,12 @@ def self.write_graph(name, copts={}) # process_copts(copts) runner = fetch_runner(copts) eputs 'Starting Graph' kit = runner.graphkit_from_lists(copts[:G], copts[:g]) - options = copts[:w] - options = (options and options =~ /\S/) ? eval(options): {} + #options = copts[:w] + #options = (options and options =~ /\S/) ? eval(options): {} name = nil unless name =~ /\S/ max = 0 name.sub!(/^\~/, ENV['HOME']) if name if name and name =~ /%d\./ regex = Regexp.new(Regexp.escape(File.basename(name)).sub(/%d/, '(?<number>\d+)')) @@ -580,10 +580,10 @@ max = [max, $~[:number].to_i].max end name = name.sub(/%d/, (max + 1).to_s) end raise "kit doesn't have a file_name and no filename specified; can't write graph" unless name or (kit.file_name.class == String and kit.file_name =~ /\S/) - Dir.chdir(COMMAND_FOLDER){kit.gnuplot_write((name or kit.file_name), options)} + Dir.chdir(COMMAND_FOLDER){kit.gnuplot_write((name or kit.file_name), {eval: copts[:w]})} end def self.read_default_command_options(copts) DEFAULT_COMMAND_OPTIONS.each do |key, value| copts[key] ||= value end