<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -9,24 +9,24 @@
     &lt;script&gt;
       $(document).ready(function() {  
         jspec.describe(&quot;fn&quot;, function() {
-          it(&quot;registers a function with a name on the object which can be invoked&quot;, function() {
+          it(&quot;registers and applies a function bound to a name&quot;, function() {
             var element = $(&quot;&lt;div&gt;&lt;/div&gt;&quot;);
-            element.fn('name', function() { return &quot;function invoked&quot; });
+            element.fn({ name: function() { return &quot;function invoked&quot; } });
             element.fn('name').should(&quot;==&quot;, &quot;function invoked&quot;);
           });
-          it(&quot;invokes functions of any arity&quot;, function() {
+          it(&quot;registers and applies a function of any arity&quot;, function() {
             var element = $(&quot;&lt;div&gt;&lt;/div&gt;&quot;);
-            element.fn('name', function(a, b, c) { return [a, b, c] });
-            element.fn('name', 1, 2, 3).should(&quot;==&quot;, [1, 2, 3]);
+            element.fn({ name: function(a, b, c) { return [a, b, c] } });
+            element.fn('name', 1, 2, 3).should(&quot;eq&quot;, [1, 2, 3]);
           });
-          it(&quot;registers many functions when provided a hash&quot;, function() {
+          it(&quot;registers many functions&quot;, function() {
             var element = $(&quot;&lt;div&gt;&lt;/div&gt;&quot;);
             element.fn({
-              name1: function() { return 'name1' },
-              name2: function() { return 'name2' }
+              name1: function() { return 1 },
+              name2: function() { return 2 }
             });
-            element.fn('name1').should(&quot;==&quot;, 'name1');
-            element.fn('name2').should(&quot;==&quot;, 'name2');
+            element.fn('name1').should(&quot;==&quot;, 1);
+            element.fn('name2').should(&quot;==&quot;, 2);
           });
         });
       });</diff>
      <filename>fn_spec.html</filename>
    </modified>
    <modified>
      <diff>@@ -2,23 +2,26 @@
 	$.fn.fn = function() {
 	  var self = this;
 	  var extension = name = arguments[0];
-	  if ( typeof name == &quot;string&quot;) {
-		  if ($.isFunction(arguments[1])) {
-		    var procedure = arguments[1];
-		    self.data('fn.' + name, procedure);
-		    return self;
-			} else {
-				var fn = self.data('fn.' + name);
-				if (fn) {
-				  var args = Array.prototype.slice.call(arguments, 1, arguments.length);
-		    	return fn.apply(self, args);
-				} else
-				  throw(name + &quot; is not defined&quot;);
-		  }
+	  if (typeof name == &quot;string&quot;) {
+		  return apply(self, name, $.makeArray(arguments).slice(1, arguments.length));
 		} else {
 			$.each(extension, function(key, value) {
-				self.fn(key, value);
+				define(self, key, value);
 			});
+			return self;
 		}
 	}
+	function define(self, name, fn) {
+    self.data(namespacedName(name), fn);
+  };
+  function apply(self, name, arguments) {
+    var fn = self.data(namespacedName(name));
+		if (fn)
+    	return fn.apply(self, arguments);
+		else
+		  throw(name + &quot; is not defined&quot;);
+  };
+  function namespacedName(name) {
+    return 'fn.' + name;
+  }
 })(jQuery);
\ No newline at end of file</diff>
      <filename>jquery.fn.js</filename>
    </modified>
    <modified>
      <diff>@@ -108,3 +108,26 @@ jspec.compress_lines = function(obj) {
       return &quot;Expected &quot; + (not ? &quot;not &quot; : &quot;&quot;) + &quot;to exist, but was &quot; + jspec.compress_lines(this);
     }
   }
+
+  jspec.matchers[&quot;eq&quot;] = {
+    describe: function(target, not) {
+      return jspec.compress_lines(this) + &quot; should &quot; + (not ? &quot;not &quot; : &quot;&quot;) + &quot;equal &quot; + jspec.compress_lines(target)
+    },
+    matches: function(target) {
+      if (this instanceof Array) {
+        if (this.length != target.length)
+          return false;
+        for (i=0; i&lt;this.length; i++) {
+          if (this[i] != target[i])
+            return false;
+        }
+        return true;
+      }
+    },
+    failure_message: function(target, not) {
+      if (not)
+	return &quot;Expected &quot; + jspec.compress_lines(this) + &quot; not to equal &quot; + jspec.compress_lines(target);
+      else
+	return &quot;Expected &quot; + jspec.compress_lines(this) + &quot;. Got &quot; + jspec.compress_lines(target);
+    }
+  }
\ No newline at end of file</diff>
      <filename>jspec.js</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>2d7adb437fc8393c19480fe4097c369467419f4b</id>
    </parent>
  </parents>
  <author>
    <name>Nick Kallen</name>
    <email>nkallen@nick-kallens-computer-2.local</email>
  </author>
  <url>http://github.com/nkallen/effen/commit/2dc062288b68203704e15310d07390025ef476b8</url>
  <id>2dc062288b68203704e15310d07390025ef476b8</id>
  <committed-date>2008-02-23T13:36:24-08:00</committed-date>
  <authored-date>2008-02-23T13:36:24-08:00</authored-date>
  <message>polish</message>
  <tree>2ed24c35b50c55a044dad0999eed86bd14daa4c5</tree>
  <committer>
    <name>Nick Kallen</name>
    <email>nkallen@nick-kallens-computer-2.local</email>
  </committer>
</commit>
