diff --git a/compiler.co b/compiler.co index ed14a96..3a983f4 100644 --- a/compiler.co +++ b/compiler.co @@ -352,11 +352,11 @@ class exports.Compiler extends EventEmitter opts = @options(info_opts) else if @options or info_opts opts = {} <<< @options <<< info_opts - args = [text] + (if opts? then [opts] else []) + args = [text, ...opts] if fn = @compile fn = @module[fn] if typeof fn is not 'function' - fn.apply this, args + [cb] + fn.apply this, [...args, cb] else if fn = @compileSync fn = @module[fn] if typeof fn is not 'function' try diff --git a/compiler.js b/compiler.js index f34b859..7231a04 100644 --- a/compiler.js +++ b/compiler.js @@ -402,9 +402,7 @@ exports.Compiler = Compiler = (function(superclass){ } else if (this.options || info_opts) { opts = __import(__import({}, this.options), info_opts); } - args = [text].concat(opts != null - ? [opts] - : []); + args = [text].concat(__slice.call(opts)); if (fn = this.compile) { if (typeof fn !== 'function') { fn = this.module[fn]; @@ -904,4 +902,4 @@ function __import(obj, src){ var own = {}.hasOwnProperty; for (var key in src) if (own.call(src, key)) obj[key] = src[key]; return obj; -} \ No newline at end of file +} diff --git a/package.co b/package.co index e4619b5..ba487cc 100644 --- a/package.co +++ b/package.co @@ -11,7 +11,7 @@ dependencies : # 'seq' : '>= 0.3.5' devDependencies : 'express' : '>= 2.5.8' - 'coco' : '>= 0.7.0 < 0.7.6' + 'coco' : '>= 0.7.0' 'coffee-script' : '>= 1.2.0' 'jade' : '>= 0.20.3' 'stylus' : '>= 0.24.0' diff --git a/package.json b/package.json index 3903308..9b687fd 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ }, "devDependencies": { "express": ">= 2.5.8", - "coco": ">= 0.7.0 < 0.7.6", + "coco": ">= 0.7.0", "coffee-script": ">= 1.2.0", "jade": ">= 0.20.3", "stylus": ">= 0.24.0",