Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

…th node v0.8
  • Loading branch information...
commit ffe25b53baff47c80b16eab2c385d47c7e5080b7 1 parent 60fdfdc
@blakmatrix blakmatrix authored
Showing with 7 additions and 7 deletions.
  1. +3 −3 examples/ex2.js
  2. +4 −4 lib/rio.js
View
6 examples/ex2.js
@@ -1,6 +1,6 @@
/*jslint node:true sloppy:true nomen:true */
-var sys = require('sys'),
+var util = require('util'),
rio = require('../lib/rio');
var args = {
@@ -13,12 +13,12 @@ function displayResponse(res) {
if (res !== false) {
res = JSON.parse(res);
for (i = 0; i < args.prods.length; i += 1) {
- sys.puts("Optimal weight for " + args.prods[i] +
+ util.puts("Optimal weight for " + args.prods[i] +
" is " + res.pw[i]);
}
// Optimal weights: 0.27107,0.2688,0.46013
} else {
- sys.puts("Optimization failed");
+ util.puts("Optimization failed");
}
}
View
8 lib/rio.js
@@ -1,6 +1,6 @@
/*jslint node:true sloppy:true bitwise:true */
-var sys = require("sys"),
+var util = require('util'),
fs = require('fs'),
net = require('net'),
binary = require('binary'),
@@ -18,7 +18,7 @@ function log(o) {
if (debug && typeof (o) === "object") {
console.log(hexy.hexy(o));
} else if (debug && typeof (o) === "string") {
- sys.puts(o);
+ util.puts(o);
}
}
@@ -183,9 +183,9 @@ function evaluate(cmd, options) {
var opts = options || {},
callback = opts.callback || function (res) {
if (res !== false) {
- sys.puts(res);
+ util.puts(res);
} else {
- sys.puts("Rserve call failed");
+ util.puts("Rserve call failed");
}
},
host = opts.host || "127.0.0.1",
Please sign in to comment.
Something went wrong with that request. Please try again.