/* Generated by Opal 0.11.99.dev */
Opal.modules["nodejs/kernel"] = function(Opal) {
  var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module;

  Opal.add_stubs(['$warn', '$to_str']);
  
  Opal.exit = process.exit;
  (function($base, $parent_nesting) {
    var self = $module($base, 'Kernel');

    var $nesting = [self].concat($parent_nesting), $Kernel_caller$1, $Kernel_node_require$2;

    
    Opal.const_set($nesting[0], 'NODE_REQUIRE', require);
    
    Opal.def(self, '$caller', $Kernel_caller$1 = function $$caller($a) {
      var $post_args, args, self = this;

      
      
      $post_args = Opal.slice.call(arguments, 0, arguments.length);
      
      args = $post_args;;
      
      var stack;
      try {
        var err = Error("my error");
        throw err;
      } catch(e) {
        stack = e.stack;
      }
      return stack.$split("\n").slice(3);
    ;
    }, $Kernel_caller$1.$$arity = -1);
    
    Opal.def(self, '$node_require', $Kernel_node_require$2 = function $$node_require(path) {
      var self = this;

      
      self.$warn("[DEPRECATION] node_require is deprecated. Please use `require('module')` instead.");
      return $$($nesting, 'NODE_REQUIRE')(path.$to_str());
    }, $Kernel_node_require$2.$$arity = 1);
  })($nesting[0], $nesting);
  return Opal.const_set($nesting[0], 'ARGV', process.argv.slice(2));
};

/* Generated by Opal 0.11.99.dev */
Opal.modules["nodejs/file"] = function(Opal) {
  var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass, $truthy = Opal.truthy, $gvars = Opal.gvars;

  Opal.add_stubs(['$raise', '$warn', '$const_get', '$new', '$const_defined?', '$const_set', '$include', '$size', '$respond_to?', '$path', '$join', '$call', '$exist?', '$realpath', '$!=', '$close', '$to_path', '$pwd', '$to_str', '$include?', '$delete', '$match?', '$sub', '$attr_reader', '$to_a', '$each_line', '$to_enum', '$read', '$chomp']);
  
  
  var warnings = {}, errno_code, errno_codes = [
    'EACCES',
    'EISDIR',
    'EMFILE',
    'ENOENT',
    'EPERM'
  ];

  function handle_unsupported_feature(message) {
    switch (Opal.config.unsupported_features_severity) {
    case 'error':
      $$($nesting, 'Kernel').$raise($$($nesting, 'NotImplementedError'), message)
      break;
    case 'warning':
      warn(message)
      break;
    default: // ignore
      // noop
    }
  }
  function warn(string) {
    if (warnings[string]) {
      return;
    }
    warnings[string] = true;
    self.$warn(string);
  }
  function is_utf8(bytes) {
    var i = 0;
    while (i < bytes.length) {
      if ((// ASCII
        bytes[i] === 0x09 ||
        bytes[i] === 0x0A ||
        bytes[i] === 0x0D ||
        (0x20 <= bytes[i] && bytes[i] <= 0x7E)
      )
      ) {
        i += 1;
        continue;
      }

      if ((// non-overlong 2-byte
        (0xC2 <= bytes[i] && bytes[i] <= 0xDF) &&
        (0x80 <= bytes[i + 1] && bytes[i + 1] <= 0xBF)
      )
      ) {
        i += 2;
        continue;
      }

      if ((// excluding overlongs
          bytes[i] === 0xE0 &&
          (0xA0 <= bytes[i + 1] && bytes[i + 1] <= 0xBF) &&
          (0x80 <= bytes[i + 2] && bytes[i + 2] <= 0xBF)
        ) ||
        (// straight 3-byte
          ((0xE1 <= bytes[i] && bytes[i] <= 0xEC) ||
            bytes[i] === 0xEE ||
            bytes[i] === 0xEF) &&
          (0x80 <= bytes[i + 1] && bytes[i + 1] <= 0xBF) &&
          (0x80 <= bytes[i + 2] && bytes[i + 2] <= 0xBF)
        ) ||
        (// excluding surrogates
          bytes[i] === 0xED &&
          (0x80 <= bytes[i + 1] && bytes[i + 1] <= 0x9F) &&
          (0x80 <= bytes[i + 2] && bytes[i + 2] <= 0xBF)
        )
      ) {
        i += 3;
        continue;
      }

      if ((// planes 1-3
          bytes[i] === 0xF0 &&
          (0x90 <= bytes[i + 1] && bytes[i + 1] <= 0xBF) &&
          (0x80 <= bytes[i + 2] && bytes[i + 2] <= 0xBF) &&
          (0x80 <= bytes[i + 3] && bytes[i + 3] <= 0xBF)
        ) ||
        (// planes 4-15
          (0xF1 <= bytes[i] && bytes[i] <= 0xF3) &&
          (0x80 <= bytes[i + 1] && bytes[i + 1] <= 0xBF) &&
          (0x80 <= bytes[i + 2] && bytes[i + 2] <= 0xBF) &&
          (0x80 <= bytes[i + 3] && bytes[i + 3] <= 0xBF)
        ) ||
        (// plane 16
          bytes[i] === 0xF4 &&
          (0x80 <= bytes[i + 1] && bytes[i + 1] <= 0x8F) &&
          (0x80 <= bytes[i + 2] && bytes[i + 2] <= 0xBF) &&
          (0x80 <= bytes[i + 3] && bytes[i + 3] <= 0xBF)
        )
      ) {
        i += 4;
        continue;
      }

      return false;
    }

    return true;
  }
  function executeIOAction(action) {
    try {
      return action();
    } catch (error) {
      if (errno_codes.indexOf(error.code) >= 0) {
        var error_class = $$($nesting, 'Errno').$const_get(error.code)
        throw (error_class).$new(error.message);
      }
      throw error;
    }
  }

  for(var i = 0, ii = errno_codes.length; i < ii; i++) {
    errno_code = errno_codes[i];
    if (!$$($nesting, 'Errno')['$const_defined?'](errno_code)) {
      $$($nesting, 'Errno').$const_set(errno_code, $$($nesting, 'Class').$new($$($nesting, 'SystemCallError')))
    }
  }
;
  (function($base, $super, $parent_nesting) {
    var self = $klass($base, $super, 'File');

    var $nesting = [self].concat($parent_nesting), $File_read$1, $File_write$2, $File_exist$ques$3, $File_realpath$4, $File_join$5, $File_directory$ques$6, $File_file$ques$7, $File_readable$ques$8, $File_size$9, $File_open$10, $File_stat$11, $File_mtime$12, $File_symlink$ques$13, $File_absolute_path$14, $File_initialize$15, $File_read$16, $File_readlines$17, $File_each_line$18, $File_write$19, $File_flush$20, $File_close$21, $File_mtime$22;
    if (self.__fs__ == null) self.__fs__ = nil;
    if (self.__path__ == null) self.__path__ = nil;
    if (self.__util__ == null) self.__util__ = nil;

    self.$$prototype.eof = self.$$prototype.binary_flag = self.$$prototype.path = self.$$prototype.fd = nil;
    
    self.$include($$$($$$('::', 'IO'), 'Writable'));
    self.$include($$$($$$('::', 'IO'), 'Readable'));
    self.__fs__ = require('fs');
    self.__path__ = require('path');
    self.__util__ = require('util');
    var __fs__ = self.__fs__;
    var __path__ = self.__path__;
    var __util__ = self.__util__;
    var __TextEncoder__ = typeof TextEncoder !== 'undefined' ? TextEncoder : __util__.TextEncoder;
    var __TextDecoder__ = typeof TextDecoder !== 'undefined' ? TextDecoder : __util__.TextDecoder;
    var __utf8TextDecoder__ = new __TextDecoder__('utf8');
    var __textEncoder__ = new __TextEncoder__();
    if ($truthy(__path__.sep !== $$($nesting, 'Separator'))) {
      Opal.const_set($nesting[0], 'ALT_SEPARATOR', __path__.sep)};
    Opal.defs(self, '$read', $File_read$1 = function $$read(path) {
      var self = this;

      return executeIOAction(function(){return __fs__.readFileSync(path).toString()})
    }, $File_read$1.$$arity = 1);
    Opal.defs(self, '$write', $File_write$2 = function $$write(path, data) {
      var self = this;

      
      executeIOAction(function(){return __fs__.writeFileSync(path, data)});
      return data.$size();
    }, $File_write$2.$$arity = 2);
    Opal.defs(self, '$exist?', $File_exist$ques$3 = function(path) {
      var self = this;

      
      if ($truthy(path['$respond_to?']("path"))) {
        path = path.$path()};
      return executeIOAction(function(){return __fs__.existsSync(path)});
    }, $File_exist$ques$3.$$arity = 1);
    Opal.defs(self, '$realpath', $File_realpath$4 = function $$realpath(pathname, dir_string, cache) {
      var $iter = $File_realpath$4.$$p, block = $iter || nil, self = this;

      if ($iter) $File_realpath$4.$$p = null;
      
      
      if ($iter) $File_realpath$4.$$p = null;;
      
      if (dir_string == null) {
        dir_string = nil;
      };
      
      if (cache == null) {
        cache = nil;
      };
      if ($truthy(dir_string)) {
        pathname = self.$join(dir_string, pathname)};
      if ((block !== nil)) {
        
        __fs__.realpath(pathname, cache, function(error, realpath){
          if (error) Opal.IOError.$new(error.message)
          else block.$call(realpath)
        })
        
      } else {
        return executeIOAction(function(){return __fs__.realpathSync(pathname, cache)})
      };
    }, $File_realpath$4.$$arity = -2);
    Opal.defs(self, '$join', $File_join$5 = function $$join($a) {
      var $post_args, paths, self = this;

      
      
      $post_args = Opal.slice.call(arguments, 0, arguments.length);
      
      paths = $post_args;;
      return __path__.posix.join.apply(__path__, paths);
    }, $File_join$5.$$arity = -1);
    Opal.defs(self, '$directory?', $File_directory$ques$6 = function(path) {
      var self = this, result = nil, realpath = nil;

      
      if ($truthy(self['$exist?'](path))) {
      } else {
        return false
      };
      result = executeIOAction(function(){return !!__fs__.lstatSync(path).isDirectory()});
      if ($truthy(result)) {
      } else {
        
        realpath = self.$realpath(path);
        if ($truthy(realpath['$!='](path))) {
          result = executeIOAction(function(){return !!__fs__.lstatSync(realpath).isDirectory()})};
      };
      return result;
    }, $File_directory$ques$6.$$arity = 1);
    Opal.defs(self, '$file?', $File_file$ques$7 = function(path) {
      var self = this, result = nil, realpath = nil;

      
      if ($truthy(self['$exist?'](path))) {
      } else {
        return false
      };
      result = executeIOAction(function(){return !!__fs__.lstatSync(path).isFile()});
      if ($truthy(result)) {
      } else {
        
        realpath = self.$realpath(path);
        if ($truthy(realpath['$!='](path))) {
          result = executeIOAction(function(){return !!__fs__.lstatSync(realpath).isFile()})};
      };
      return result;
    }, $File_file$ques$7.$$arity = 1);
    Opal.defs(self, '$readable?', $File_readable$ques$8 = function(path) {
      var self = this;

      
      if ($truthy(self['$exist?'](path))) {
      } else {
        return false
      };
      return "" + "\n" + "        try {\n" + "          __fs__.accessSync(path, __fs__.R_OK);\n" + "          return true;\n" + "        } catch (error) {\n" + "          return false;\n" + "        }\n" + "      ";
    }, $File_readable$ques$8.$$arity = 1);
    Opal.defs(self, '$size', $File_size$9 = function $$size(path) {
      var self = this;

      return executeIOAction(function(){return __fs__.lstatSync(path).size});
    }, $File_size$9.$$arity = 1);
    Opal.defs(self, '$open', $File_open$10 = function $$open(path, mode) {
      var $iter = $File_open$10.$$p, $yield = $iter || nil, self = this, file = nil;

      if ($iter) $File_open$10.$$p = null;
      
      
      if (mode == null) {
        mode = "r";
      };
      file = self.$new(path, mode);
      if (($yield !== nil)) {
        
        return (function() { try {
        return Opal.yield1($yield, file);
        } finally {
          file.$close()
        }; })();
      } else {
        return file
      };
    }, $File_open$10.$$arity = -2);
    Opal.defs(self, '$stat', $File_stat$11 = function $$stat(path) {
      var self = this;

      
      if ($truthy(path['$respond_to?']("path"))) {
        path = path.$path()};
      return $$$($$($nesting, 'File'), 'Stat').$new(path);
    }, $File_stat$11.$$arity = 1);
    Opal.defs(self, '$mtime', $File_mtime$12 = function $$mtime(path) {
      var self = this;

      return executeIOAction(function(){return __fs__.statSync(path).mtime})
    }, $File_mtime$12.$$arity = 1);
    Opal.defs(self, '$symlink?', $File_symlink$ques$13 = function(path) {
      var self = this;

      return executeIOAction(function(){return __fs__.lstatSync(path).isSymbolicLink()})
    }, $File_symlink$ques$13.$$arity = 1);
    Opal.defs(self, '$absolute_path', $File_absolute_path$14 = function $$absolute_path(path, basedir) {
      var $a, self = this;

      
      
      if (basedir == null) {
        basedir = nil;
      };
      path = (function() {if ($truthy(path['$respond_to?']("to_path"))) {
        return path.$to_path()
      } else {
        return path
      }; return nil; })();
      basedir = ($truthy($a = basedir) ? $a : $$($nesting, 'Dir').$pwd());
      return __path__.normalize(__path__.resolve(basedir.$to_str(), path.$to_str())).split(__path__.sep).join(__path__.posix.sep);
    }, $File_absolute_path$14.$$arity = -2);
    
    Opal.def(self, '$initialize', $File_initialize$15 = function $$initialize(path, flags) {
      var self = this, encoding_option_rx = nil;

      
      
      if (flags == null) {
        flags = "r";
      };
      self.binary_flag = flags['$include?']("b");
      flags = flags.$delete("b");
      encoding_option_rx = /:(.*)/;
      if ($truthy(encoding_option_rx['$match?'](flags))) {
        
        handle_unsupported_feature("Encoding option (:encoding) is unsupported by Node.js openSync method and will be removed.");
        flags = flags.$sub(encoding_option_rx, "");};
      self.path = path;
      self.flags = flags;
      return (self.fd = executeIOAction(function(){return __fs__.openSync(path, flags)}));
    }, $File_initialize$15.$$arity = -2);
    self.$attr_reader("path");
    
    Opal.def(self, '$read', $File_read$16 = function $$read() {
      var self = this, res = nil;

      if ($truthy(self.eof)) {
        return ""
      } else {
        
        if ($truthy(self.binary_flag)) {
          
          
          var buf = executeIOAction(function(){return __fs__.readFileSync(self.path)})
          var content
          if (is_utf8(buf)) {
            content = buf.toString('utf8')
          } else {
            // coerce to utf8
            content = __utf8TextDecoder__.decode(__textEncoder__.encode(buf.toString('binary')))
          }
        ;
          res = content;
        } else {
          res = executeIOAction(function(){return __fs__.readFileSync(self.path).toString('utf8')})
        };
        self.eof = true;
        self.lineno = res.$size();
        return res;
      }
    }, $File_read$16.$$arity = 0);
    
    Opal.def(self, '$readlines', $File_readlines$17 = function $$readlines(separator) {
      var self = this;
      if ($gvars["/"] == null) $gvars["/"] = nil;

      
      
      if (separator == null) {
        separator = $gvars["/"];
      };
      return self.$each_line(separator).$to_a();
    }, $File_readlines$17.$$arity = -1);
    
    Opal.def(self, '$each_line', $File_each_line$18 = function $$each_line(separator) {
      var $iter = $File_each_line$18.$$p, block = $iter || nil, self = this, lines = nil;
      if ($gvars["/"] == null) $gvars["/"] = nil;

      if ($iter) $File_each_line$18.$$p = null;
      
      
      if ($iter) $File_each_line$18.$$p = null;;
      
      if (separator == null) {
        separator = $gvars["/"];
      };
      if ($truthy(self.eof)) {
        return (function() {if ((block !== nil)) {
          return self
        } else {
          return [].$to_enum()
        }; return nil; })()};
      if ((block !== nil)) {
        
        lines = $$($nesting, 'File').$read(self.path);
        
        self.eof = false;
        self.lineno = 0;
        var chomped  = lines.$chomp(),
            trailing = lines.length != chomped.length,
            splitted = chomped.split(separator);
        for (var i = 0, length = splitted.length; i < length; i++) {
          self.lineno += 1;
          if (i < length - 1 || trailing) {
            Opal.yield1(block, splitted[i] + separator);
          }
          else {
            Opal.yield1(block, splitted[i]);
          }
        }
        self.eof = true;
      ;
        return self;
      } else {
        return self.$read().$each_line(separator)
      };
    }, $File_each_line$18.$$arity = -1);
    
    Opal.def(self, '$write', $File_write$19 = function $$write(string) {
      var self = this;

      return executeIOAction(function(){return __fs__.writeSync(self.fd, string)})
    }, $File_write$19.$$arity = 1);
    
    Opal.def(self, '$flush', $File_flush$20 = function $$flush() {
      var self = this;

      return executeIOAction(function(){return __fs__.fsyncSync(self.fd)})
    }, $File_flush$20.$$arity = 0);
    
    Opal.def(self, '$close', $File_close$21 = function $$close() {
      var self = this;

      return executeIOAction(function(){return __fs__.closeSync(self.fd)})
    }, $File_close$21.$$arity = 0);
    return (Opal.def(self, '$mtime', $File_mtime$22 = function $$mtime() {
      var self = this;

      return executeIOAction(function(){return __fs__.statSync(self.path).mtime})
    }, $File_mtime$22.$$arity = 0), nil) && 'mtime';
  })($nesting[0], $$($nesting, 'IO'), $nesting);
  return (function($base, $super, $parent_nesting) {
    var self = $klass($base, $super, 'Stat');

    var $nesting = [self].concat($parent_nesting), $Stat_initialize$23, $Stat_file$ques$24, $Stat_mtime$25;
    if (self.__fs__ == null) self.__fs__ = nil;

    self.$$prototype.path = nil;
    
    self.__fs__ = require('fs');
    var __fs__ = self.__fs__;
    
    Opal.def(self, '$initialize', $Stat_initialize$23 = function $$initialize(path) {
      var self = this;

      return (self.path = path)
    }, $Stat_initialize$23.$$arity = 1);
    
    Opal.def(self, '$file?', $Stat_file$ques$24 = function() {
      var self = this;

      return executeIOAction(function(){return __fs__.statSync(self.path).isFile()})
    }, $Stat_file$ques$24.$$arity = 0);
    return (Opal.def(self, '$mtime', $Stat_mtime$25 = function $$mtime() {
      var self = this;

      return executeIOAction(function(){return __fs__.statSync(self.path).mtime})
    }, $Stat_mtime$25.$$arity = 0), nil) && 'mtime';
  })($$($nesting, 'File'), null, $nesting);
};

/* Generated by Opal 0.11.99.dev */
Opal.modules["nodejs/dir"] = function(Opal) {
  var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass, $truthy = Opal.truthy, $send = Opal.send;

  Opal.add_stubs(['$respond_to?', '$flat_map', '$to_path', '$coerce_to!']);
  return (function($base, $super, $parent_nesting) {
    var self = $klass($base, $super, 'Dir');

    var $nesting = [self].concat($parent_nesting);
    if (self.__glob__ == null) self.__glob__ = nil;
    if (self.__fs__ == null) self.__fs__ = nil;
    if (self.__path__ == null) self.__path__ = nil;
    if (self.__os__ == null) self.__os__ = nil;

    
    self.__glob__ = require('glob');
    self.__fs__ = require('fs');
    self.__path__ = require('path');
    self.__os__ = require('os');
    var __glob__ = self.__glob__;
    var __fs__ = self.__fs__;
    var __path__ = self.__path__;
    var __os__ = self.__os__;
    return (function(self, $parent_nesting) {
      var $nesting = [self].concat($parent_nesting), $$$1, $pwd$2, $home$3, $chdir$4, $mkdir$5, $entries$6, $glob$7;

      
      
      Opal.def(self, '$[]', $$$1 = function(glob) {
        var self = this;

        return __glob__.sync(glob)
      }, $$$1.$$arity = 1);
      
      Opal.def(self, '$pwd', $pwd$2 = function $$pwd() {
        var self = this;

        return process.cwd().split(__path__.sep).join(__path__.posix.sep);
      }, $pwd$2.$$arity = 0);
      
      Opal.def(self, '$home', $home$3 = function $$home() {
        var self = this;

        return __os__.homedir();
      }, $home$3.$$arity = 0);
      
      Opal.def(self, '$chdir', $chdir$4 = function $$chdir(path) {
        var self = this;

        return process.chdir(path)
      }, $chdir$4.$$arity = 1);
      
      Opal.def(self, '$mkdir', $mkdir$5 = function $$mkdir(path) {
        var self = this;

        return __fs__.mkdirSync(path)
      }, $mkdir$5.$$arity = 1);
      
      Opal.def(self, '$entries', $entries$6 = function $$entries(dirname) {
        var self = this;

        
        var result = [];
        var entries = __fs__.readdirSync(dirname);
        for (var i = 0, ii = entries.length; i < ii; i++) {
          result.push(entries[i]);
        }
        return result;
      
      }, $entries$6.$$arity = 1);
      
      Opal.def(self, '$glob', $glob$7 = function $$glob(pattern) {
        var $$8, self = this;

        
        if ($truthy(pattern['$respond_to?']("each"))) {
        } else {
          pattern = [pattern]
        };
        return $send(pattern, 'flat_map', [], ($$8 = function(subpattern){var self = $$8.$$s || this;

        
          
          if (subpattern == null) {
            subpattern = nil;
          };
          if ($truthy(subpattern['$respond_to?']("to_path"))) {
            subpattern = subpattern.$to_path()};
          subpattern = $$($nesting, 'Opal')['$coerce_to!'](subpattern, $$($nesting, 'String'), "to_str");
          return __glob__.sync(subpattern);;}, $$8.$$s = self, $$8.$$arity = 1, $$8));
      }, $glob$7.$$arity = 1);
      return Opal.alias(self, "getwd", "pwd");
    })(Opal.get_singleton_class(self), $nesting);
  })($nesting[0], null, $nesting)
};

/* Generated by Opal 0.11.99.dev */
Opal.modules["nodejs/io"] = function(Opal) {
  function $rb_minus(lhs, rhs) {
    return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs);
  }
  var $$5, $$6, self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass, $lambda = Opal.lambda, $send = Opal.send, $writer = nil;

  Opal.add_stubs(['$attr_reader', '$write', '$read', '$write_proc=', '$-', '$tty=']);
  
  
  function executeIOAction(action) {
    try {
      return action();
    } catch (error) {
      if (error.code === 'EACCES' ||
          error.code === 'EISDIR' ||
          error.code === 'EMFILE' ||
          error.code === 'ENOENT' ||
          error.code === 'EPERM') {
        throw Opal.IOError.$new(error.message)
      }
      throw error;
    }
  }
;
  (function($base, $super, $parent_nesting) {
    var self = $klass($base, $super, 'IO');

    var $nesting = [self].concat($parent_nesting), $IO_initialize$1, $IO_write$2, $IO_read$3, $IO_binread$4;
    if (self.__fs__ == null) self.__fs__ = nil;

    
    self.__fs__ = require('fs');
    var __fs__ = self.__fs__;
    self.$attr_reader("eof");
    self.$attr_reader("lineno");
    
    Opal.def(self, '$initialize', $IO_initialize$1 = function $$initialize() {
      var self = this;

      
      self.eof = false;
      return (self.lineno = 0);
    }, $IO_initialize$1.$$arity = 0);
    Opal.defs(self, '$write', $IO_write$2 = function $$write(path, data) {
      var self = this;

      return $$($nesting, 'File').$write(path, data)
    }, $IO_write$2.$$arity = 2);
    Opal.defs(self, '$read', $IO_read$3 = function $$read(path) {
      var self = this;

      return $$($nesting, 'File').$read(path)
    }, $IO_read$3.$$arity = 1);
    return (Opal.defs(self, '$binread', $IO_binread$4 = function $$binread(path) {
      var self = this;

      return executeIOAction(function(){return __fs__.readFileSync(path).toString('binary')})
    }, $IO_binread$4.$$arity = 1), nil) && 'binread';
  })($nesting[0], null, $nesting);
  
  $writer = [$lambda(($$5 = function(string){var self = $$5.$$s || this;

  
    
    if (string == null) {
      string = nil;
    };
    return process.stdout.write(string);;}, $$5.$$s = self, $$5.$$arity = 1, $$5))];
  $send($$($nesting, 'STDOUT'), 'write_proc=', Opal.to_a($writer));
  $writer[$rb_minus($writer["length"], 1)];;
  
  $writer = [$lambda(($$6 = function(string){var self = $$6.$$s || this;

  
    
    if (string == null) {
      string = nil;
    };
    return process.stderr.write(string);;}, $$6.$$s = self, $$6.$$arity = 1, $$6))];
  $send($$($nesting, 'STDERR'), 'write_proc=', Opal.to_a($writer));
  $writer[$rb_minus($writer["length"], 1)];;
  
  $writer = [true];
  $send($$($nesting, 'STDOUT'), 'tty=', Opal.to_a($writer));
  $writer[$rb_minus($writer["length"], 1)];;
  
  $writer = [true];
  $send($$($nesting, 'STDERR'), 'tty=', Opal.to_a($writer));
  return $writer[$rb_minus($writer["length"], 1)];;
};

/* Generated by Opal 0.11.99.dev */
Opal.modules["nodejs/open-uri"] = function(Opal) {
  var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module;

  return (function($base, $parent_nesting) {
    var self = $module($base, 'OpenURI');

    var $nesting = [self].concat($parent_nesting), $OpenURI_request$1, $OpenURI_data$2;
    if (self.__xmlhttprequest__ == null) self.__xmlhttprequest__ = nil;

    
    self.__xmlhttprequest__ = require('unxhr');
    var __XMLHttpRequest__ = self.__xmlhttprequest__.XMLHttpRequest;
    Opal.defs(self, '$request', $OpenURI_request$1 = function $$request(uri) {
      var self = this;

      
      var xhr = new __XMLHttpRequest__();
      xhr.open('GET', uri, false);
      xhr.responseType = 'arraybuffer';
      xhr.send();
      return xhr;
    
    }, $OpenURI_request$1.$$arity = 1);
    Opal.defs(self, '$data', $OpenURI_data$2 = function $$data(req) {
      var self = this;

      
      var arrayBuffer = req.response;
      var byteArray = new Uint8Array(arrayBuffer);
      var result = []
      for (var i = 0; i < byteArray.byteLength; i++) {
        result.push(byteArray[i]);
      }
      return result;
    
    }, $OpenURI_data$2.$$arity = 1);
  })($nesting[0], $nesting)
};

/* Generated by Opal 0.11.99.dev */
Opal.modules["corelib/comparable"] = function(Opal) {
  function $rb_gt(lhs, rhs) {
    return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs > rhs : lhs['$>'](rhs);
  }
  function $rb_lt(lhs, rhs) {
    return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs < rhs : lhs['$<'](rhs);
  }
  var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $truthy = Opal.truthy;

  Opal.add_stubs(['$===', '$>', '$<', '$equal?', '$<=>', '$normalize', '$raise', '$class']);
  return (function($base, $parent_nesting) {
    var self = $module($base, 'Comparable');

    var $nesting = [self].concat($parent_nesting), $Comparable_normalize$1, $Comparable_$eq_eq$2, $Comparable_$gt$3, $Comparable_$gt_eq$4, $Comparable_$lt$5, $Comparable_$lt_eq$6, $Comparable_between$ques$7, $Comparable_clamp$8;

    
    Opal.defs(self, '$normalize', $Comparable_normalize$1 = function $$normalize(what) {
      var self = this;

      
      if ($truthy($$($nesting, 'Integer')['$==='](what))) {
        return what};
      if ($truthy($rb_gt(what, 0))) {
        return 1};
      if ($truthy($rb_lt(what, 0))) {
        return -1};
      return 0;
    }, $Comparable_normalize$1.$$arity = 1);
    
    Opal.def(self, '$==', $Comparable_$eq_eq$2 = function(other) {
      var self = this, cmp = nil;

      try {
        
        if ($truthy(self['$equal?'](other))) {
          return true};
        
      if (self["$<=>"] == Opal.Kernel["$<=>"]) {
        return false;
      }

      // check for infinite recursion
      if (self.$$comparable) {
        delete self.$$comparable;
        return false;
      }
    ;
        if ($truthy((cmp = self['$<=>'](other)))) {
        } else {
          return false
        };
        return $$($nesting, 'Comparable').$normalize(cmp) == 0;
      } catch ($err) {
        if (Opal.rescue($err, [$$($nesting, 'StandardError')])) {
          try {
            return false
          } finally { Opal.pop_exception() }
        } else { throw $err; }
      }
    }, $Comparable_$eq_eq$2.$$arity = 1);
    
    Opal.def(self, '$>', $Comparable_$gt$3 = function(other) {
      var self = this, cmp = nil;

      
      if ($truthy((cmp = self['$<=>'](other)))) {
      } else {
        self.$raise($$($nesting, 'ArgumentError'), "" + "comparison of " + (self.$class()) + " with " + (other.$class()) + " failed")
      };
      return $$($nesting, 'Comparable').$normalize(cmp) > 0;
    }, $Comparable_$gt$3.$$arity = 1);
    
    Opal.def(self, '$>=', $Comparable_$gt_eq$4 = function(other) {
      var self = this, cmp = nil;

      
      if ($truthy((cmp = self['$<=>'](other)))) {
      } else {
        self.$raise($$($nesting, 'ArgumentError'), "" + "comparison of " + (self.$class()) + " with " + (other.$class()) + " failed")
      };
      return $$($nesting, 'Comparable').$normalize(cmp) >= 0;
    }, $Comparable_$gt_eq$4.$$arity = 1);
    
    Opal.def(self, '$<', $Comparable_$lt$5 = function(other) {
      var self = this, cmp = nil;

      
      if ($truthy((cmp = self['$<=>'](other)))) {
      } else {
        self.$raise($$($nesting, 'ArgumentError'), "" + "comparison of " + (self.$class()) + " with " + (other.$class()) + " failed")
      };
      return $$($nesting, 'Comparable').$normalize(cmp) < 0;
    }, $Comparable_$lt$5.$$arity = 1);
    
    Opal.def(self, '$<=', $Comparable_$lt_eq$6 = function(other) {
      var self = this, cmp = nil;

      
      if ($truthy((cmp = self['$<=>'](other)))) {
      } else {
        self.$raise($$($nesting, 'ArgumentError'), "" + "comparison of " + (self.$class()) + " with " + (other.$class()) + " failed")
      };
      return $$($nesting, 'Comparable').$normalize(cmp) <= 0;
    }, $Comparable_$lt_eq$6.$$arity = 1);
    
    Opal.def(self, '$between?', $Comparable_between$ques$7 = function(min, max) {
      var self = this;

      
      if ($rb_lt(self, min)) {
        return false};
      if ($rb_gt(self, max)) {
        return false};
      return true;
    }, $Comparable_between$ques$7.$$arity = 2);
    
    Opal.def(self, '$clamp', $Comparable_clamp$8 = function $$clamp(min, max) {
      var self = this, cmp = nil;

      
      cmp = min['$<=>'](max);
      if ($truthy(cmp)) {
      } else {
        self.$raise($$($nesting, 'ArgumentError'), "" + "comparison of " + (min.$class()) + " with " + (max.$class()) + " failed")
      };
      if ($truthy($rb_gt($$($nesting, 'Comparable').$normalize(cmp), 0))) {
        self.$raise($$($nesting, 'ArgumentError'), "min argument must be smaller than max argument")};
      if ($truthy($rb_lt($$($nesting, 'Comparable').$normalize(self['$<=>'](min)), 0))) {
        return min};
      if ($truthy($rb_gt($$($nesting, 'Comparable').$normalize(self['$<=>'](max)), 0))) {
        return max};
      return self;
    }, $Comparable_clamp$8.$$arity = 2);
  })($nesting[0], $nesting)
};

/* Generated by Opal 0.11.99.dev */
Opal.modules["pathname"] = function(Opal) {
  function $rb_plus(lhs, rhs) {
    return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs + rhs : lhs['$+'](rhs);
  }
  var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass, $truthy = Opal.truthy, $send = Opal.send, $module = Opal.module;

  Opal.add_stubs(['$require', '$include', '$quote', '$===', '$to_s', '$path', '$respond_to?', '$to_path', '$is_a?', '$nil?', '$raise', '$class', '$==', '$attr_reader', '$!', '$relative?', '$chop_basename', '$basename', '$=~', '$new', '$source', '$[]', '$rindex', '$sub', '$absolute?', '$expand_path', '$plus', '$unshift', '$length', '$!=', '$empty?', '$first', '$shift', '$+', '$join', '$dirname', '$pop', '$reverse_each', '$directory?', '$extname', '$<=>', '$nonzero?', '$proc', '$casecmp', '$cleanpath', '$inspect', '$include?', '$fill', '$map', '$entries']);
  
  self.$require("corelib/comparable");
  (function($base, $super, $parent_nesting) {
    var self = $klass($base, $super, 'Pathname');

    var $nesting = [self].concat($parent_nesting), $Pathname_initialize$1, $Pathname_$eq_eq$2, $Pathname_absolute$ques$3, $Pathname_relative$ques$4, $Pathname_chop_basename$5, $Pathname_root$ques$6, $Pathname_parent$7, $Pathname_sub$8, $Pathname_cleanpath$9, $Pathname_to_path$10, $Pathname_hash$11, $Pathname_expand_path$12, $Pathname_$plus$13, $Pathname_plus$14, $Pathname_join$15, $Pathname_split$17, $Pathname_dirname$18, $Pathname_basename$19, $Pathname_directory$ques$20, $Pathname_extname$21, $Pathname_$lt_eq_gt$22, $Pathname$23, $Pathname$24, $Pathname_relative_path_from$25, $Pathname_entries$26;

    self.$$prototype.path = nil;
    
    self.$include($$($nesting, 'Comparable'));
    Opal.const_set($nesting[0], 'SEPARATOR_PAT', new RegExp($$($nesting, 'Regexp').$quote($$$($$($nesting, 'File'), 'SEPARATOR'))));
    
    Opal.def(self, '$initialize', $Pathname_initialize$1 = function $$initialize(path) {
      var self = this;

      
      if ($truthy($$($nesting, 'Pathname')['$==='](path))) {
        self.path = path.$path().$to_s()
      } else if ($truthy(path['$respond_to?']("to_path"))) {
        self.path = path.$to_path()
      } else if ($truthy(path['$is_a?']($$($nesting, 'String')))) {
        self.path = path
      } else if ($truthy(path['$nil?']())) {
        self.$raise($$($nesting, 'TypeError'), "no implicit conversion of nil into String")
      } else {
        self.$raise($$($nesting, 'TypeError'), "" + "no implicit conversion of " + (path.$class()) + " into String")
      };
      if (self.path['$==']("\u0000")) {
        return self.$raise($$($nesting, 'ArgumentError'))
      } else {
        return nil
      };
    }, $Pathname_initialize$1.$$arity = 1);
    self.$attr_reader("path");
    
    Opal.def(self, '$==', $Pathname_$eq_eq$2 = function(other) {
      var self = this;

      return other.$path()['$=='](self.path)
    }, $Pathname_$eq_eq$2.$$arity = 1);
    
    Opal.def(self, '$absolute?', $Pathname_absolute$ques$3 = function() {
      var self = this;

      return self['$relative?']()['$!']()
    }, $Pathname_absolute$ques$3.$$arity = 0);
    
    Opal.def(self, '$relative?', $Pathname_relative$ques$4 = function() {
      var $a, $b, $c, self = this, path = nil, r = nil;

      
      path = self.path;
      while ($truthy((r = self.$chop_basename(path)))) {
        $c = r, $b = Opal.to_ary($c), (path = ($b[0] == null ? nil : $b[0])), $c
      };
      return path['$==']("");
    }, $Pathname_relative$ques$4.$$arity = 0);
    
    Opal.def(self, '$chop_basename', $Pathname_chop_basename$5 = function $$chop_basename(path) {
      var self = this, base = nil;

      
      base = $$($nesting, 'File').$basename(path);
      if ($truthy($$($nesting, 'Regexp').$new("" + "^" + ($$$($$($nesting, 'Pathname'), 'SEPARATOR_PAT').$source()) + "?$")['$=~'](base))) {
        return nil
      } else {
        return [path['$[]'](0, path.$rindex(base)), base]
      };
    }, $Pathname_chop_basename$5.$$arity = 1);
    
    Opal.def(self, '$root?', $Pathname_root$ques$6 = function() {
      var self = this;

      return self.path['$==']("/")
    }, $Pathname_root$ques$6.$$arity = 0);
    
    Opal.def(self, '$parent', $Pathname_parent$7 = function $$parent() {
      var self = this, new_path = nil;

      
      new_path = self.path.$sub(/\/([^\/]+\/?$)/, "");
      if (new_path['$==']("")) {
        new_path = (function() {if ($truthy(self['$absolute?']())) {
          return "/"
        } else {
          return "."
        }; return nil; })()};
      return $$($nesting, 'Pathname').$new(new_path);
    }, $Pathname_parent$7.$$arity = 0);
    
    Opal.def(self, '$sub', $Pathname_sub$8 = function $$sub($a) {
      var $post_args, args, self = this;

      
      
      $post_args = Opal.slice.call(arguments, 0, arguments.length);
      
      args = $post_args;;
      return $$($nesting, 'Pathname').$new($send(self.path, 'sub', Opal.to_a(args)));
    }, $Pathname_sub$8.$$arity = -1);
    
    Opal.def(self, '$cleanpath', $Pathname_cleanpath$9 = function $$cleanpath() {
      var self = this;

      return Opal.normalize(self.path)
    }, $Pathname_cleanpath$9.$$arity = 0);
    
    Opal.def(self, '$to_path', $Pathname_to_path$10 = function $$to_path() {
      var self = this;

      return self.path
    }, $Pathname_to_path$10.$$arity = 0);
    
    Opal.def(self, '$hash', $Pathname_hash$11 = function $$hash() {
      var self = this;

      return self.path
    }, $Pathname_hash$11.$$arity = 0);
    
    Opal.def(self, '$expand_path', $Pathname_expand_path$12 = function $$expand_path() {
      var self = this;

      return $$($nesting, 'Pathname').$new($$($nesting, 'File').$expand_path(self.path))
    }, $Pathname_expand_path$12.$$arity = 0);
    
    Opal.def(self, '$+', $Pathname_$plus$13 = function(other) {
      var self = this;

      
      if ($truthy($$($nesting, 'Pathname')['$==='](other))) {
      } else {
        other = $$($nesting, 'Pathname').$new(other)
      };
      return $$($nesting, 'Pathname').$new(self.$plus(self.path, other.$to_s()));
    }, $Pathname_$plus$13.$$arity = 1);
    
    Opal.def(self, '$plus', $Pathname_plus$14 = function $$plus(path1, path2) {
      var $a, $b, $c, self = this, prefix2 = nil, index_list2 = nil, basename_list2 = nil, r2 = nil, basename2 = nil, prefix1 = nil, r1 = nil, basename1 = nil, suffix2 = nil;

      
      prefix2 = path2;
      index_list2 = [];
      basename_list2 = [];
      while ($truthy((r2 = self.$chop_basename(prefix2)))) {
        
        $c = r2, $b = Opal.to_ary($c), (prefix2 = ($b[0] == null ? nil : $b[0])), (basename2 = ($b[1] == null ? nil : $b[1])), $c;
        index_list2.$unshift(prefix2.$length());
        basename_list2.$unshift(basename2);
      };
      if ($truthy(prefix2['$!='](""))) {
        return path2};
      prefix1 = path1;
      while ($truthy(true)) {
        
        while ($truthy(($truthy($c = basename_list2['$empty?']()['$!']()) ? basename_list2.$first()['$=='](".") : $c))) {
          
          index_list2.$shift();
          basename_list2.$shift();
        };
        if ($truthy((r1 = self.$chop_basename(prefix1)))) {
        } else {
          break;
        };
        $c = r1, $b = Opal.to_ary($c), (prefix1 = ($b[0] == null ? nil : $b[0])), (basename1 = ($b[1] == null ? nil : $b[1])), $c;
        if (basename1['$=='](".")) {
          continue;};
        if ($truthy(($truthy($b = ($truthy($c = basename1['$==']("..")) ? $c : basename_list2['$empty?']())) ? $b : basename_list2.$first()['$!=']("..")))) {
          
          prefix1 = $rb_plus(prefix1, basename1);
          break;;};
        index_list2.$shift();
        basename_list2.$shift();
      };
      r1 = self.$chop_basename(prefix1);
      if ($truthy(($truthy($a = r1['$!']()) ? new RegExp($$($nesting, 'SEPARATOR_PAT'))['$=~']($$($nesting, 'File').$basename(prefix1)) : $a))) {
        while ($truthy(($truthy($b = basename_list2['$empty?']()['$!']()) ? basename_list2.$first()['$==']("..") : $b))) {
          
          index_list2.$shift();
          basename_list2.$shift();
        }};
      if ($truthy(basename_list2['$empty?']()['$!']())) {
        
        suffix2 = path2['$[]'](Opal.Range.$new(index_list2.$first(), -1, false));
        if ($truthy(r1)) {
          return $$($nesting, 'File').$join(prefix1, suffix2)
        } else {
          return $rb_plus(prefix1, suffix2)
        };
      } else if ($truthy(r1)) {
        return prefix1
      } else {
        return $$($nesting, 'File').$dirname(prefix1)
      };
    }, $Pathname_plus$14.$$arity = 2);
    
    Opal.def(self, '$join', $Pathname_join$15 = function $$join($a) {try {

      var $post_args, args, $$16, self = this, result = nil;

      
      
      $post_args = Opal.slice.call(arguments, 0, arguments.length);
      
      args = $post_args;;
      if ($truthy(args['$empty?']())) {
        return self};
      result = args.$pop();
      if ($truthy($$($nesting, 'Pathname')['$==='](result))) {
      } else {
        result = $$($nesting, 'Pathname').$new(result)
      };
      if ($truthy(result['$absolute?']())) {
        return result};
      $send(args, 'reverse_each', [], ($$16 = function(arg){var self = $$16.$$s || this;

      
        
        if (arg == null) {
          arg = nil;
        };
        if ($truthy($$($nesting, 'Pathname')['$==='](arg))) {
        } else {
          arg = $$($nesting, 'Pathname').$new(arg)
        };
        result = $rb_plus(arg, result);
        if ($truthy(result['$absolute?']())) {
          Opal.ret(result)
        } else {
          return nil
        };}, $$16.$$s = self, $$16.$$arity = 1, $$16));
      return $rb_plus(self, result);
      } catch ($returner) { if ($returner === Opal.returner) { return $returner.$v } throw $returner; }
    }, $Pathname_join$15.$$arity = -1);
    
    Opal.def(self, '$split', $Pathname_split$17 = function $$split() {
      var self = this;

      return [self.$dirname(), self.$basename()]
    }, $Pathname_split$17.$$arity = 0);
    
    Opal.def(self, '$dirname', $Pathname_dirname$18 = function $$dirname() {
      var self = this;

      return $$($nesting, 'Pathname').$new($$($nesting, 'File').$dirname(self.path))
    }, $Pathname_dirname$18.$$arity = 0);
    
    Opal.def(self, '$basename', $Pathname_basename$19 = function $$basename() {
      var self = this;

      return $$($nesting, 'Pathname').$new($$($nesting, 'File').$basename(self.path))
    }, $Pathname_basename$19.$$arity = 0);
    
    Opal.def(self, '$directory?', $Pathname_directory$ques$20 = function() {
      var self = this;

      return $$($nesting, 'File')['$directory?'](self.path)
    }, $Pathname_directory$ques$20.$$arity = 0);
    
    Opal.def(self, '$extname', $Pathname_extname$21 = function $$extname() {
      var self = this;

      return $$($nesting, 'File').$extname(self.path)
    }, $Pathname_extname$21.$$arity = 0);
    
    Opal.def(self, '$<=>', $Pathname_$lt_eq_gt$22 = function(other) {
      var self = this;

      return self.$path()['$<=>'](other.$path())
    }, $Pathname_$lt_eq_gt$22.$$arity = 1);
    Opal.alias(self, "eql?", "==");
    Opal.alias(self, "===", "==");
    Opal.alias(self, "to_str", "to_path");
    Opal.alias(self, "to_s", "to_path");
    Opal.const_set($nesting[0], 'SAME_PATHS', (function() {if ($truthy($$$($$($nesting, 'File'), 'FNM_SYSCASE')['$nonzero?']())) {
      return $send(self, 'proc', [], ($Pathname$23 = function(a, b){var self = $Pathname$23.$$s || this;

      
        
        if (a == null) {
          a = nil;
        };
        
        if (b == null) {
          b = nil;
        };
        return a.$casecmp(b)['$=='](0);}, $Pathname$23.$$s = self, $Pathname$23.$$arity = 2, $Pathname$23))
    } else {
      return $send(self, 'proc', [], ($Pathname$24 = function(a, b){var self = $Pathname$24.$$s || this;

      
        
        if (a == null) {
          a = nil;
        };
        
        if (b == null) {
          b = nil;
        };
        return a['$=='](b);}, $Pathname$24.$$s = self, $Pathname$24.$$arity = 2, $Pathname$24))
    }; return nil; })());
    
    Opal.def(self, '$relative_path_from', $Pathname_relative_path_from$25 = function $$relative_path_from(base_directory) {
      var $a, $b, $c, self = this, dest_directory = nil, dest_prefix = nil, dest_names = nil, r = nil, basename = nil, base_prefix = nil, base_names = nil, relpath_names = nil;

      
      dest_directory = self.$cleanpath().$to_s();
      base_directory = base_directory.$cleanpath().$to_s();
      dest_prefix = dest_directory;
      dest_names = [];
      while ($truthy((r = self.$chop_basename(dest_prefix)))) {
        
        $c = r, $b = Opal.to_ary($c), (dest_prefix = ($b[0] == null ? nil : $b[0])), (basename = ($b[1] == null ? nil : $b[1])), $c;
        if ($truthy(basename['$!=']("."))) {
          dest_names.$unshift(basename)};
      };
      base_prefix = base_directory;
      base_names = [];
      while ($truthy((r = self.$chop_basename(base_prefix)))) {
        
        $c = r, $b = Opal.to_ary($c), (base_prefix = ($b[0] == null ? nil : $b[0])), (basename = ($b[1] == null ? nil : $b[1])), $c;
        if ($truthy(basename['$!=']("."))) {
          base_names.$unshift(basename)};
      };
      if ($truthy($$($nesting, 'SAME_PATHS')['$[]'](dest_prefix, base_prefix))) {
      } else {
        self.$raise($$($nesting, 'ArgumentError'), "" + "different prefix: " + (dest_prefix.$inspect()) + " and " + (base_directory.$inspect()))
      };
      while ($truthy(($truthy($b = ($truthy($c = dest_names['$empty?']()['$!']()) ? base_names['$empty?']()['$!']() : $c)) ? $$($nesting, 'SAME_PATHS')['$[]'](dest_names.$first(), base_names.$first()) : $b))) {
        
        dest_names.$shift();
        base_names.$shift();
      };
      if ($truthy(base_names['$include?'](".."))) {
        self.$raise($$($nesting, 'ArgumentError'), "" + "base_directory has ..: " + (base_directory.$inspect()))};
      base_names.$fill("..");
      relpath_names = $rb_plus(base_names, dest_names);
      if ($truthy(relpath_names['$empty?']())) {
        return $$($nesting, 'Pathname').$new(".")
      } else {
        return $$($nesting, 'Pathname').$new($send($$($nesting, 'File'), 'join', Opal.to_a(relpath_names)))
      };
    }, $Pathname_relative_path_from$25.$$arity = 1);
    return (Opal.def(self, '$entries', $Pathname_entries$26 = function $$entries() {
      var $$27, self = this;

      return $send($$($nesting, 'Dir').$entries(self.path), 'map', [], ($$27 = function(f){var self = $$27.$$s || this;

      
        
        if (f == null) {
          f = nil;
        };
        return self.$class().$new(f);}, $$27.$$s = self, $$27.$$arity = 1, $$27))
    }, $Pathname_entries$26.$$arity = 0), nil) && 'entries';
  })($nesting[0], null, $nesting);
  return (function($base, $parent_nesting) {
    var self = $module($base, 'Kernel');

    var $nesting = [self].concat($parent_nesting), $Kernel_Pathname$28;

    
    Opal.def(self, '$Pathname', $Kernel_Pathname$28 = function $$Pathname(path) {
      var self = this;

      return $$($nesting, 'Pathname').$new(path)
    }, $Kernel_Pathname$28.$$arity = 1)
  })($nesting[0], $nesting);
};

/* Generated by Opal 0.11.99.dev */
Opal.modules["nodejs/pathname"] = function(Opal) {
  var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass;

  Opal.add_stubs(['$require', '$include', '$to_str', '$!', '$absolute?']);
  
  self.$require("pathname");
  return (function($base, $super, $parent_nesting) {
    var self = $klass($base, $super, 'Pathname');

    var $nesting = [self].concat($parent_nesting), $Pathname_absolute$ques$1, $Pathname_relative$ques$2, $Pathname_to_path$3;
    if (self.__path__ == null) self.__path__ = nil;

    self.$$prototype.path = nil;
    
    self.$include($$($nesting, 'Comparable'));
    self.__path__ = require('path');
    var __path__ = self.__path__;
    
    Opal.def(self, '$absolute?', $Pathname_absolute$ques$1 = function() {
      var self = this;

      return __path__.isAbsolute(self.path.$to_str())
    }, $Pathname_absolute$ques$1.$$arity = 0);
    
    Opal.def(self, '$relative?', $Pathname_relative$ques$2 = function() {
      var self = this;

      return self['$absolute?']()['$!']()
    }, $Pathname_relative$ques$2.$$arity = 0);
    return (Opal.def(self, '$to_path', $Pathname_to_path$3 = function $$to_path() {
      var self = this;

      return self.path
    }, $Pathname_to_path$3.$$arity = 0), nil) && 'to_path';
  })($nesting[0], null, $nesting);
};

/* Generated by Opal 0.11.99.dev */
Opal.modules["nodejs/env"] = function(Opal) {
  var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice;

  Opal.add_stubs(['$new', '$to_s']);
  
  Opal.const_set($nesting[0], 'ENV', $$($nesting, 'Object').$new());
  return (function(self, $parent_nesting) {
    var $nesting = [self].concat($parent_nesting), $$$1, $$$eq$2, $key$ques$3, $empty$ques$4, $keys$5, $delete$6, $to_s$7;

    
    
    Opal.def(self, '$[]', $$$1 = function(name) {
      var self = this;

      return process.env[name] || nil
    }, $$$1.$$arity = 1);
    
    Opal.def(self, '$[]=', $$$eq$2 = function(name, value) {
      var self = this;

      return process.env[name.$to_s()] = value.$to_s()
    }, $$$eq$2.$$arity = 2);
    
    Opal.def(self, '$key?', $key$ques$3 = function(name) {
      var self = this;

      return process.env.hasOwnProperty(name)
    }, $key$ques$3.$$arity = 1);
    Opal.alias(self, "has_key?", "key?");
    Opal.alias(self, "include?", "key?");
    Opal.alias(self, "member?", "key?");
    
    Opal.def(self, '$empty?', $empty$ques$4 = function() {
      var self = this;

      return Object.keys(process.env).length === 0;
    }, $empty$ques$4.$$arity = 0);
    
    Opal.def(self, '$keys', $keys$5 = function $$keys() {
      var self = this;

      return Object.keys(process.env);
    }, $keys$5.$$arity = 0);
    
    Opal.def(self, '$delete', $delete$6 = function(name) {
      var self = this;

      
      var value = process.env[name] || nil;
      delete process.env[name];
      return value;
    
    }, $delete$6.$$arity = 1);
    return (Opal.def(self, '$to_s', $to_s$7 = function $$to_s() {
      var self = this;

      return "ENV"
    }, $to_s$7.$$arity = 0), nil) && 'to_s';
  })(Opal.get_singleton_class($$($nesting, 'ENV')), $nesting);
};

/* Generated by Opal 0.11.99.dev */
Opal.modules["nodejs"] = function(Opal) {
  var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module;

  Opal.add_stubs(['$require']);
  
  (function($base, $parent_nesting) {
    var self = $module($base, 'NodeJS');

    var $nesting = [self].concat($parent_nesting);

    nil
  })($nesting[0], $nesting);
  self.$require("nodejs/kernel");
  self.$require("nodejs/file");
  self.$require("nodejs/dir");
  self.$require("nodejs/io");
  self.$require("nodejs/open-uri");
  self.$require("nodejs/pathname");
  return self.$require("nodejs/env");
};
