csshx icon indicating copy to clipboard operation
csshx copied to clipboard

Failures on ruby calling _CGSDefaultConnection

Open GoogleCodeExporter opened this issue 11 years ago • 0 comments

csshX fails when it tries to use ruby to open shared libraries using `dl.open` 
and just before the terminal window closes itself, I see:

    -:5:in 'sym': wrong number of arguments (2 for 1) (ArgumentError)
    from -:5:in '<main>'

This seems to come from:

        require 'dl'
        dl = DL::dlopen('/System/Library/Frameworks/ApplicationServices.framework/ApplicationServices')
        con = dl.sym('_CGSDefaultConnection', '${I}').call()

which does indeed fail on machine:

    $ irb 
    irb(main):001:0> require 'dl'
    DL is deprecated, please use Fiddle
    => true
    irb(main):002:0> dl = DL::dlopen('/System/Library/Frameworks/ApplicationServices.framework/ApplicationServices')
    => #<DL::Handle:0x007fd712896c28>
    irb(main):003:0> dl.sym('_CGSDefaultConnection', 'I')
    ArgumentError: wrong number of arguments (2 for 1)
        from (irb):3:in `sym'
        from (irb):3
        from /usr/bin/irb:12:in `<main>'
    irb(main):004:0>

Original issue reported on code.google.com by [email protected] on 7 Mar 2014 at 8:52

GoogleCodeExporter avatar Mar 03 '15 22:03 GoogleCodeExporter