Ruby-Graphviz icon indicating copy to clipboard operation
Ruby-Graphviz copied to clipboard

Prevent exceptions being masked by undefined method errors in ruby 2.4

Open zspencer opened this issue 6 years ago • 3 comments

@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

zspencer avatar Mar 06 '18 22:03 zspencer

Ran into the same issue and this PR fixes it for me. Thanks @zspencer. @glejeune, would you be willing to merge this?

aguynamedryan avatar Mar 12 '20 19:03 aguynamedryan

Can confirm. This makes it usable in my project. Please merge it!

ymarkus avatar Dec 03 '20 09:12 ymarkus

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 :)

soberstadt avatar Jan 11 '21 20:01 soberstadt