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! #267

Closed
wants to merge 1 commit into from

2 participants

node-migrator-bot Farrin Reid
node-migrator-bot

Hello nodejitsu!

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 .

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

Farrin Reid blakmatrix closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jun 20, 2012
  1. Farrin Reid
This page is out of date. Refresh to see the latest.
Showing with 6 additions and 6 deletions.
  1. +6 −6 vendor/websocket.js
12 vendor/websocket.js
View
@@ -38,7 +38,7 @@ var http = require('http');
var https = require('https');
var net = require('net');
var urllib = require('url');
-var sys = require('sys');
+var util = require('util');
var FRAME_NO = 0;
var FRAME_LO = 1;
@@ -52,7 +52,7 @@ var CLOSED = 3;
var debugLevel = parseInt(process.env.NODE_DEBUG, 16);
var debug = (debugLevel & 0x4) ?
- function() { sys.error.apply(this, arguments); } :
+ function() { util.error.apply(this, arguments); } :
function() { };
// Generate a Sec-WebSocket-* value
@@ -246,7 +246,7 @@ var WebSocket = function(url, proto, opts) {
// FRAME_LO
function(buf, off) {
- debug('frame_lo(' + sys.inspect(buf) + ', ' + off + ')');
+ debug('frame_lo(' + util.inspect(buf) + ', ' + off + ')');
// Find the first instance of 0xff, our terminating byte
for (var i = off; i < buf.length && buf[i] != 0xff; i++)
@@ -306,7 +306,7 @@ var WebSocket = function(url, proto, opts) {
// FRAME_HI
function(buf, off) {
- debug('frame_hi(' + sys.inspect(buf) + ', ' + off + ')');
+ debug('frame_hi(' + util.inspect(buf) + ', ' + off + ')');
if (buf[off] !== 0) {
throw new Error('High-byte framing not supported.');
@@ -323,7 +323,7 @@ var WebSocket = function(url, proto, opts) {
return;
}
- debug('dataListener(' + sys.inspect(buf) + ')');
+ debug('dataListener(' + util.inspect(buf) + ')');
var off = 0;
var consumed = 0;
@@ -624,7 +624,7 @@ var WebSocket = function(url, proto, opts) {
httpReq.end();
})();
};
-sys.inherits(WebSocket, events.EventEmitter);
+util.inherits(WebSocket, events.EventEmitter);
exports.WebSocket = WebSocket;
// Add some constants to the WebSocket object
Something went wrong with that request. Please try again.