[Groonga-commit] groonga/gcs at e7b7647 [master] Fix wrong inheritance code

Back to archive index

Kouhei Sutou null+****@clear*****
Sun Mar 2 14:01:25 JST 2014


Kouhei Sutou	2014-03-02 14:01:25 +0900 (Sun, 02 Mar 2014)

  New Revision: e7b76473e44271baf4c967c988dffd4020a32cc4
  https://github.com/groonga/gcs/commit/e7b76473e44271baf4c967c988dffd4020a32cc4

  Message:
    Fix wrong inheritance code

  Modified files:
    tools/scenario-runner.js

  Modified: tools/scenario-runner.js (+5 -2)
===================================================================
--- tools/scenario-runner.js    2014-03-02 13:57:23 +0900 (a8c6951)
+++ tools/scenario-runner.js    2014-03-02 14:01:25 +0900 (a2f7a21)
@@ -1,3 +1,4 @@
+var util = require('util');
 var Client = require(__dirname + '/../lib/client').Client;
 var EventEmitter = require('events').EventEmitter;
 var xml2js = require('xml2js');
@@ -13,10 +14,11 @@ var statusCodeTable = {
 };
 
 function ScenariosRunner(options) {
+  ScenariosRunner.super_.call(this);
   this.options = options;
 }
 
-ScenariosRunner.prototype = new EventEmitter();
+util.inherits(ScenariosRunner, EventEmitter);
 
 ScenariosRunner.prototype.run = function(scenarios) {
   var params = { scenarios: expandScenarios(scenarios) };
@@ -132,13 +134,14 @@ ScenariosRunner.prototype._process = function(params) {
 };
 
 function ScenarioRunner(options) {
+  ScenarioRunner.super_.call(this);
   this.client = new Client(options);
   this.options = options;
   if (options.documentEndpoint)
     this.client.docEndpoint = options.documentEndpoint;
 }
 
-ScenarioRunner.prototype = new EventEmitter();
+util.inherits(ScenarioRunner, EventEmitter);
 
 ScenarioRunner.prototype.run = function(scenario) {
   if (this.options.ignoreDirtyEnvironment) {
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index