ruby-dbus
ruby-dbus copied to clipboard
NoMethodError when DISPLAY environment variable is not set
A NoMethodError
is raised when the DISPLAY environment variable is not set due to https://github.com/mvidner/ruby-dbus/blob/v0.11.0/lib/dbus/bus.rb#L611
undefined method '[]' for nil:NilClass (NoMethodError)
Indeed. To reproduce it,
(unset DBUS_SESSION_BUS_ADDRESS DISPLAY; ruby -r dbus -e 'p DBus.session_bus')
I see, a bug fix broke a method that is not covered by tests: https://coveralls.io/files/138379387#L611