[MacRuby] #416: DRB does not work with MacRuby 5.0
#416: DRB does not work with MacRuby 5.0 ------------------------------+--------------------------------------------- Reporter: gaz@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: drb ------------------------------+--------------------------------------------- I've a problem using Drb and get a problem I don't get if I use bog standard ruby 1.8 My client and server code is below. The server works fine but if I try and invoke any method on the client from the server I get this error: {{{ core:in `open:': can't convert NSMutableDictionary into String (TypeError) from /Library/Frameworks/MacRuby.framework/Versions/0.5/usr/lib/ruby/1.9.0/drb/drb.rb:1196:in `initialize:' from core:in `__new__:' from /Library/Frameworks/MacRuby.framework/Versions/0.5/usr/lib/ruby/1.9.0/drb/drb.rb:1163:in `open:' from /Library/Frameworks/MacRuby.framework/Versions/0.5/usr/lib/ruby/1.9.0/drb/drb.rb:1109:in `with_friend:' from /Library/Frameworks/MacRuby.framework/Versions/0.5/usr/lib/ruby/1.9.0/drb/drb.rb:1091:in `method_missing:' from /Users/garyliddon/drbtest.rb:1:in `<main>' }}} Any help super gratefully received :) gaz '''SERVER CODE'' {{{ 'require 'drb' class Incrementer def initialize @value = 0 end def increment @value += 1 end end service = DRb.start_service("druby://localhost:4242", Incrementer.new) print "service started on port 4242\n" DRb.thread.join }}} '''CLIENT CODE''' {{{ require 'drb' DRb.start_service server = DRbObject.new_with_uri('druby://localhost:4242') p server.increment #this is what causes the error }}} -- Ticket URL: <http://www.macruby.org/trac/ticket/416> MacRuby <http://macruby.org/>
#416: DRB does not work with MacRuby 5.0 ------------------------------+--------------------------------------------- Reporter: gaz@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: drb ------------------------------+--------------------------------------------- Comment(by lsansonetti@…): The problem is inside File#open, the modes argument doesn't seem valid. {{{ (gdb) po modes { "argc_limit" = 256; idconv = "#<DRb::DRbIdConv:0x2000f3c60>"; "load_limit" = 26214400; "safe_level" = 0; "tcp_acl" = "<null>"; verbose = 0; } }}} -- Ticket URL: <http://www.macruby.org/trac/ticket/416#comment:1> MacRuby <http://macruby.org/>
#416: DRB does not work with MacRuby 5.0 ------------------------------+--------------------------------------------- Reporter: gaz@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: drb ------------------------------+--------------------------------------------- Comment(by lsansonetti@…): Reduction 1: {{{ $ macruby -r drb -e "p DRb::DRbProtocol.open('hey', {})" core:in `open:': can't convert NSMutableDictionary into String (TypeError) from -e:1:in `<main>' }}} In this case, it seems that we call Kernel#open directly and not DRbProtocol#open. Reduction 2: {{{ $ macruby -e "module X; def open(a); p a; end; module_function :open; end; X.open('hey')" core:in `open:': No such file or directory - open() failed (Errno::ENOENT) from -e:1:in `<main>' }}} This looks like the same bug as described in #396. -- Ticket URL: <http://www.macruby.org/trac/ticket/416#comment:2> MacRuby <http://macruby.org/>
#416: DRB does not work with MacRuby 5.0 ------------------------------+--------------------------------------------- Reporter: gaz@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: drb ------------------------------+--------------------------------------------- Comment(by gaz@…): Probably talking nonsense here :D Both this and the bug #396 have problems with functions in a module that module_function is used on. Could there be a problem with that? I saw a change made to module_function code just before the beta in this changeset http://www.macruby.org/trac/changeset/2828/MacRuby/trunk/vm.cpp I'm super new to MacRuby and can't read the code very well but it seemed odd that a specific function to set the flags to 0 had been removed, especially as they seem to govern visibility for the function being prepared. -- Ticket URL: <http://www.macruby.org/trac/ticket/416#comment:3> MacRuby <http://macruby.org/>
#416: DRB does not work with MacRuby 5.0 ------------------------------+--------------------------------------------- Reporter: gaz@… | Owner: lsansonetti@… Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 0.5 Component: MacRuby | Resolution: fixed Keywords: drb | ------------------------------+--------------------------------------------- Changes (by lsansonetti@…): * status: new => closed * resolution: => fixed * milestone: => MacRuby 0.5 Comment: Should be fixed by r2941. -- Ticket URL: <http://www.macruby.org/trac/ticket/416#comment:5> MacRuby <http://macruby.org/>
participants (1)
-
MacRuby