From 708cca27fb62cdd3593f32cf824ae90531f1e1f8 Mon Sep 17 00:00:00 2001 From: Page Date: Mon, 11 Jul 2011 17:31:59 +0100 Subject: [PATCH] Change the matchAll function created within createInstance to use this for its references. This fixes an issue where if you clone the returned object and then run matchAll it runs on the original rather than cloned object. --- ometa-base.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ometa-base.js b/ometa-base.js index 8155eea0..747b18f8 100644 --- a/ometa-base.js +++ b/ometa-base.js @@ -504,8 +504,8 @@ OMeta = { var m = objectThatDelegatesTo(this) m.initialize() m.matchAll = function(listyObj, aRule) { - m.input = listyObj.toOMInputStream() - return m._apply(aRule) + this.input = listyObj.toOMInputStream() + return this._apply(aRule) } return m }