Permalink
Browse files

Actually fix serialization of functions.

  • Loading branch information...
1 parent 01a7059 commit 7295e9a579e89a715bde6e78c439b16741e366d7 @steveWang steveWang committed Aug 8, 2011
Showing with 3 additions and 3 deletions.
  1. +2 −2 examples/simple/simple.rb
  2. +1 −1 lib/util.rb
@@ -1,10 +1,10 @@
-require 'ruby-now'
+require "ruby-now"
EventMachine::run {
EventMachine::start_server "127.0.0.1", 8081, RubyNow
RubyNow.registerFunction('aFunctionObject', lambda{|*a|
puts a.join(' ')})
RubyNow.registerFunction('otherFunc', lambda{|cb, *a|
- cb.call(a.join(' '))})
+ cb.call(*a)})
puts 'Running TCP server on port 8081. Awaiting orders.'
}
View
@@ -28,7 +28,7 @@ def self.serializeArgs args
@@closures[a['fqn']] :
self.remoteCall(a['fqn']))):
(a.is_a?(Proc) ?
- (((@@closures[a.to_s] = a) && true) ||
+ (((@@closures[a.to_s] = a) && false) ||
{"fqn" => a.to_s}) :
a))
}

0 comments on commit 7295e9a

Please sign in to comment.