Browse files

[fix] Changed require('util') to require('util') for compatibility wi…

…th node v0.8
  • Loading branch information...
1 parent 4c430f7 commit a3353789f208d4e9058971b26ddd92fea25f437e @blakmatrix blakmatrix committed Jun 23, 2012
Showing with 5 additions and 5 deletions.
  1. +1 −1 bench.js
  2. +2 −2 bin/msgpack2json
  3. +2 −2 lib/msgpack.js
View
2 bench.js
@@ -2,7 +2,7 @@
var assert = require('assert');
var msgpack = require('msgpack');
-var sys = require('sys');
+var util = require('util');
var DATA_TEMPLATE = {'abcdef' : 1, 'qqq' : 13, '19' : [1, 2, 3, 4]};
var DATA = [];
View
4 bin/msgpack2json
@@ -3,11 +3,11 @@
var msgpack = require('msgpack');
var net = require('net');
-var sys = require('sys');
+var util = require('util');
var s = new net.Stream(0);
s.addListener('data', function(b) {
- sys.puts(JSON.stringify(msgpack.unpack(b)));
+ util.puts(JSON.stringify(msgpack.unpack(b)));
});
s.resume();
View
4 lib/msgpack.js
@@ -3,7 +3,7 @@
var buffer = require('buffer');
var events = require('events');
var mpBindings = require('../build/default/mpBindings');
-var sys = require('sys');
+var util = require('util');
var pack = mpBindings.pack;
var unpack = mpBindings.unpack;
@@ -68,5 +68,5 @@ var Stream = function(s) {
});
};
-sys.inherits(Stream, events.EventEmitter);
+util.inherits(Stream, events.EventEmitter);
exports.Stream = Stream;

0 comments on commit a335378

Please sign in to comment.