Ruby-Graphviz
Ruby-Graphviz copied to clipboard
Prevent exceptions being masked by undefined method errors in ruby 2.4
@glejeune - This may be a ruby 2.4 idiosynracy, I didn't take the time to diagnose it further.
Essentially, sometimes the status returned from output_and_errors_from_command is nil, which does not respond to zero?
; causing the actual commands errors to be masked.
This patches that so the underlying graphviz usage errors can bubble up.
I believe this resolves both https://github.com/glejeune/Ruby-Graphviz/issues/133 and https://github.com/glejeune/Ruby-Graphviz/issues/125
Ran into the same issue and this PR fixes it for me. Thanks @zspencer. @glejeune, would you be willing to merge this?
Can confirm. This makes it usable in my project. Please merge it!
This came up for me today too. It exposed an actual error from graphviz (not a helpful error, but at least an error). Please merge this :)