glejeune / Ruby-Graphviz

[MIRROR] Ruby interface to the GraphViz graphing tool
https://gitlab.com/glejeune/ruby-graphviz
Other
608 stars 116 forks source link

Prevent exceptions being masked by undefined method errors in ruby 2.4 #135

Open zspencer opened 6 years ago

zspencer commented 6 years ago

@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

aguynamedryan commented 4 years ago

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

ymarkus commented 3 years ago

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

soberstadt commented 3 years ago

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