Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Hi! I fixed some calls to "sys" for you! #2

Open
wants to merge 1 commit into from

2 participants

@node-migrator-bot

Hello Floby!

I am migrationBot, an open-source bot, and I'm here to help you migrate your codebase to node v0.8!

Did you know that the "sys" module throws an error if your program tries to require it in node v0.8? To help keep your code running, I automatically replaced var sys = require('sys') with var util = require('util').

If you'd like to know more about these changes in node.js, take a look at joyent/node@1582cf#L1R51 and https://github.com/joyent/node/blob/1582cfebd6719b2d2373547994b3dca5c8c569c0/ChangeLog#L51 and http://blog.jit.su/introducing-blakmatrix-and-migratorbot .

As for myself, I was written by your friendly neighborhood node ninjas at Nodejitsu, and you can find them at #nodejitsu on irc.freenode.net or with http://webchat.jit.su .

Enjoy!

--migrationBot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jun 23, 2012
  1. @blakmatrix
This page is out of date. Refresh to see the latest.
Showing with 7 additions and 7 deletions.
  1. +3 −3 lib/compile.js
  2. +2 −2 lib/template.js
  3. +2 −2 test.js
View
6 lib/compile.js
@@ -1,7 +1,7 @@
-var sys = require ('sys')
+var util = require('util')
function substitute_affectation(str, p1, offset, s) {
- //console.log(sys.inspect(p1))
+ //console.log(util.inspect(p1))
var split = p1.split('|');
var str = split.shift();
if(split.length == 0) {
@@ -26,7 +26,7 @@ function substitute_affectation(str, p1, offset, s) {
+ str
+ parenthesis
+ ');%>';
- //sys.debug(result);
+ //util.debug(result);
return result;
}
View
4 lib/template.js
@@ -1,6 +1,6 @@
var fs = require('fs');
var path = require('path');
-var sys = require('sys');
+var util = require('util');
var Stream = require('stream').Stream;
var Script = process.binding('evals').Script;
var process_template = require('./compile');
@@ -12,7 +12,7 @@ var Template = function Template(filename, data) {
this._buffers = [];
this._data = data;
}
-sys.inherits(Template, Stream);
+util.inherits(Template, Stream);
Template.prototype.sandbox = function sandbox(object) {
this.sandbox = object || {};
View
4 test.js
@@ -1,10 +1,10 @@
#!/usr/bin/env node
-var sys = require('sys'),
+var util = require('util'),
blue = require('./lib/blue');
var t = new blue.Template('example/main.tpl');
t.on('data', function(data) {
- sys.print(data);
+ util.print(data);
});
t.data({require:require});
t.run();
Something went wrong with that request. Please try again.