Skip to content

Commit 8c85340

Browse files
bmizeranyry
authored andcommitted
fix whitespace errors
1 parent f8ca6b3 commit 8c85340

38 files changed

Lines changed: 96 additions & 96 deletions

benchmark/http_simple.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ http.createServer(function (req, res) {
2828
if (command == "bytes") {
2929
var n = parseInt(arg, 10)
3030
if (n <= 0)
31-
throw "bytes called with n <= 0"
31+
throw "bytes called with n <= 0"
3232
if (stored[n] === undefined) {
3333
console.log("create stored[n]");
3434
stored[n] = "";
@@ -64,7 +64,7 @@ http.createServer(function (req, res) {
6464

6565
var content_length = body.length.toString();
6666

67-
res.writeHead( status
67+
res.writeHead( status
6868
, { "Content-Type": "text/plain"
6969
, "Content-Length": content_length
7070
}

benchmark/http_simple.rb

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,45 +7,45 @@ def fib(n)
77

88
def wait(seconds)
99
n = (seconds / 0.01).to_i
10-
n.times do
10+
n.times do
1111
sleep(0.01)
12-
#File.read(DIR + '/yahoo.html')
12+
#File.read(DIR + '/yahoo.html')
1313
end
1414
end
1515

1616
class SimpleApp
1717
@@responses = {}
18-
18+
1919
def initialize
2020
@count = 0
2121
end
22-
22+
2323
def deferred?(env)
2424
false
2525
end
26-
26+
2727
def call(env)
2828
path = env['PATH_INFO'] || env['REQUEST_URI']
2929
commands = path.split('/')
30-
30+
3131
@count += 1
3232
if commands.include?('periodical_activity') and @count % 10 != 1
3333
return [200, {'Content-Type'=>'text/plain'}, "quick response!\r\n"]
3434
end
35-
35+
3636
if commands.include?('fibonacci')
3737
n = commands.last.to_i
3838
raise "fibonacci called with n <= 0" if n <= 0
3939
body = (1..n).to_a.map { |i| fib(i).to_s }.join(' ')
4040
status = 200
41-
41+
4242
elsif commands.include?('wait')
4343
n = commands.last.to_f
4444
raise "wait called with n <= 0" if n <= 0
4545
wait(n)
4646
body = "waited about #{n} seconds"
4747
status = 200
48-
48+
4949
elsif commands.include?('bytes')
5050
n = commands.last.to_i
5151
raise "bytes called with n <= 0" if n <= 0
@@ -56,17 +56,17 @@ def call(env)
5656
n = 20 * 1024;
5757
body = @@responses[n] || "C"*n
5858
status = 200
59-
59+
6060
elsif commands.include?('test_post_length')
6161
input_body = ""
6262
while chunk = env['rack.input'].read(512)
63-
input_body << chunk
63+
input_body << chunk
6464
end
6565
if env['CONTENT_LENGTH'].to_i == input_body.length
6666
body = "Content-Length matches input length"
6767
status = 200
6868
else
69-
body = "Content-Length doesn't matches input length!
69+
body = "Content-Length doesn't matches input length!
7070
content_length = #{env['CONTENT_LENGTH'].to_i}
7171
input_body.length = #{input_body.length}"
7272
status = 500
@@ -75,7 +75,7 @@ def call(env)
7575
status = 404
7676
body = "Undefined url"
7777
end
78-
78+
7979
body += "\r\n"
8080
headers = {'Content-Type' => 'text/plain', 'Content-Length' => body.length.to_s }
8181
[status, headers, [body]]
@@ -90,6 +90,6 @@ def call(env)
9090
require 'thin'
9191
require 'ebb'
9292
# Rack::Handler::Mongrel.run(SimpleApp.new, :Port => 8000)
93-
Thin::Server.start("0.0.0.0", 8000, SimpleApp.new)
93+
Thin::Server.start("0.0.0.0", 8000, SimpleApp.new)
9494
# Ebb::start_server(SimpleApp.new, :port => 8000)
9595
end

lib/crypto.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3596,7 +3596,7 @@ try {
35963596
var Verify = binding.Verify;
35973597
var crypto = true;
35983598
} catch (e) {
3599-
3599+
36003600
var crypto = false;
36013601
}
36023602

lib/net.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ function setImplmentationMethods (self) {
363363

364364
return bytesWritten;
365365
};
366-
366+
367367
var oldRead = self._readImpl;
368368
self._readImpl = function(buf, off, len, calledByIOWatcher) {
369369
assert(self.secure);

lib/readline.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ Interface.prototype._ttyWrite = function (b) {
164164
if (this.cursor === 0 && this.line.length === 0) {
165165
this.close();
166166
} else if (this.cursor < this.line.length) {
167-
this.line = this.line.slice(0, this.cursor)
167+
this.line = this.line.slice(0, this.cursor)
168168
+ this.line.slice(this.cursor+1, this.line.length)
169169
;
170170
this._refreshLine();

lib/repl.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -137,14 +137,14 @@ REPLServer.prototype.readline = function (cmd) {
137137

138138
/**
139139
* Used to parse and execute the Node REPL commands.
140-
*
140+
*
141141
* @param {cmd} cmd The command entered to check
142-
* @returns {Boolean} If true it means don't continue parsing the command
142+
* @returns {Boolean} If true it means don't continue parsing the command
143143
*/
144144

145145
REPLServer.prototype.parseREPLKeyword = function (cmd) {
146146
var self = this;
147-
147+
148148
switch (cmd) {
149149
case ".break":
150150
self.buffered_cmd = '';
@@ -171,7 +171,7 @@ REPLServer.prototype.parseREPLKeyword = function (cmd) {
171171
};
172172

173173
function trimWhitespace (cmd) {
174-
var trimmer = /^\s*(.+)\s*$/m,
174+
var trimmer = /^\s*(.+)\s*$/m,
175175
matches = trimmer.exec(cmd);
176176

177177
if (matches && matches.length === 2) {
@@ -183,26 +183,26 @@ function trimWhitespace (cmd) {
183183
* Converts commands that use var and function <name>() to use the
184184
* local exports.context when evaled. This provides a local context
185185
* on the REPL.
186-
*
186+
*
187187
* @param {String} cmd The cmd to convert
188188
* @returns {String} The converted command
189189
*/
190190
REPLServer.prototype.convertToContext = function (cmd) {
191191
var self = this, matches,
192192
scopeVar = /^\s*var\s*([_\w\$]+)(.*)$/m,
193193
scopeFunc = /^\s*function\s*([_\w\$]+)/;
194-
194+
195195
// Replaces: var foo = "bar"; with: self.context.foo = bar;
196196
matches = scopeVar.exec(cmd);
197197
if (matches && matches.length === 3) {
198198
return "self.context." + matches[1] + matches[2];
199199
}
200-
200+
201201
// Replaces: function foo() {}; with: foo = function foo() {};
202202
matches = scopeFunc.exec(self.buffered_cmd);
203203
if (matches && matches.length === 2) {
204204
return matches[1] + " = " + self.buffered_cmd;
205205
}
206-
206+
207207
return cmd;
208208
};

lib/string_decoder.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ var StringDecoder = exports.StringDecoder = function (encoding) {
1111

1212

1313
StringDecoder.prototype.write = function (buffer) {
14-
// If not utf8...
14+
// If not utf8...
1515
if (this.encoding !== 'utf8') {
1616
return buffer.toString(this.encoding);
1717
}

src/node.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1166,7 +1166,7 @@ static Handle<Value> SetGid(const Arguments& args) {
11661166
}
11671167

11681168
int gid;
1169-
1169+
11701170
if (args[0]->IsNumber()) {
11711171
gid = args[0]->Int32Value();
11721172
} else if (args[0]->IsString()) {

src/node_buffer.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -509,8 +509,8 @@ Handle<Value> Buffer::ByteLength(const Arguments &args) {
509509
enum encoding e = ParseEncoding(args[1], UTF8);
510510

511511
Local<Integer> length =
512-
Integer::New(e == UTF8 ? s->Utf8Length() : s->Length());
513-
512+
Integer::New(e == UTF8 ? s->Utf8Length() : s->Length());
513+
514514
return scope.Close(length);
515515
}
516516

src/node_cares.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ using namespace v8;
2424

2525
static Handle<Value> IsIP(const Arguments& args) {
2626
HandleScope scope;
27-
27+
2828
if (!args[0]->IsString()) {
2929
return scope.Close(Integer::New(4));
3030
}

0 commit comments

Comments
 (0)