Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NoMethodError when DISPLAY environment variable is not set #53

Open
sos4nt opened this issue Jul 10, 2014 · 1 comment
Open

NoMethodError when DISPLAY environment variable is not set #53

sos4nt opened this issue Jul 10, 2014 · 1 comment

Comments

@sos4nt
Copy link

sos4nt commented Jul 10, 2014

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)

@mvidner
Copy link
Owner

mvidner commented Jul 10, 2014

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants