<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -151,4 +151,38 @@ Element.Methods.enableClassName = function(element, className, condition) {
   return Element[condition ? 'addClassName' : 'removeClassName'](element, className);
 };
 
+/**
+ * Element.wrapContent(@element, wrapper, attributes) -&gt; @element
+ *
+ * Wraps element's content with wrapper (i.e. a DOMElement or an html string)
+ *
+ *
+ *    &lt;pre id=&quot;foo&quot;&gt;
+ *      some content &lt;span&gt;some tag&lt;/span&gt;
+ *    &lt;/pre&gt;
+ *    ...
+ *    $('foo').wrapContent('&lt;code class=&quot;javascript&quot;&gt;');
+ *    ...
+ *    &lt;pre&gt;
+ *      &lt;code class=&quot;javascript&quot;&gt; 
+ *        some content &lt;span&gt;some tag&lt;/span&gt;
+ *      &lt;/code&gt;
+ *    &lt;/pre&gt;
+ *
+ **/
+Element.Methods.wrapContent = function(element, wrapper, attributes) {
+  if (!(element = $(element))) return;
+  if (Object.isElement(wrapper))
+    $(wrapper).writeAttribute(attributes || { })
+  else if (Object.isString(wrapper))
+    wrapper = new Element(wrapper, attributes);
+  else wrapper = new Element('div', wrapper);
+  
+  while (element.firstChild)
+    wrapper.appendChild(element.firstChild)
+  
+  element.appendChild(wrapper);
+  return element;
+};
+
 Element.addMethods();
\ No newline at end of file</diff>
      <filename>element.methods.js</filename>
    </modified>
    <modified>
      <diff>@@ -1,15 +1,15 @@
 /**
- * Function#negate() -&gt; Function
+ * Function#not() -&gt; Function
  *
  * Returns negated function
  * 
  * Find all hidden elements:
  * 
  * $$('*').findAll(function(element) { return !element.visible() }); // old way
- * $$('*').findAll(Element.visible.negate()); // using negate
+ * $$('*').findAll(Element.visible.not()); // using not
  *
  **/
-Function.prototype.negate = function() {
+Function.prototype.not = function() {
   var f = this;
   return function() {
     return !f.apply(f, arguments);
@@ -44,7 +44,7 @@ Function.prototype.runOnce = function() {
  *
  **/
 Function.prototype._new = function() {
-  var __method = this, args = arguments;
+  var __method = this, args = $A(arguments);
   function C() { return __method.apply(this, args); };
   C.prototype = __method.prototype;
   return new C;</diff>
      <filename>function.extensions.js</filename>
    </modified>
    <modified>
      <diff>@@ -21,16 +21,16 @@
     
     &lt;script type=&quot;text/javascript&quot;&gt;
       new Test.Unit.Runner({
-        testFunctionPrototypeNegate: function() {
+        testFunctionPrototypeNot: function() {
           
           var truthy = function() { return true; };
           var falsy = function() { return false; };
           var something = function() { return {foo: 'bar'} };
           
           this.assert(truthy());
-          this.assert(!truthy.negate()());
+          this.assert(!truthy.not()());
           this.assert(!falsy());
-          this.assert(falsy.negate()());
+          this.assert(falsy.not()());
         },
         
         testFunctionPrototypeRunOnce: function() {</diff>
      <filename>test/function.extensions.html</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>8b8b65119f6de18abf0df494c93cae070ea1a6f5</id>
    </parent>
  </parents>
  <author>
    <name>kangax</name>
    <email>juriyzaytsev@ny3-dhcp-94.ithaka.org</email>
  </author>
  <url>http://github.com/kangax/protolicious/commit/add9d3504056e49596593c4d199980dd744b22d1</url>
  <id>add9d3504056e49596593c4d199980dd744b22d1</id>
  <committed-date>2008-05-23T13:15:59-07:00</committed-date>
  <authored-date>2008-05-23T13:15:59-07:00</authored-date>
  <message>Add Element#wrapContent</message>
  <tree>e3737b031e219fcb08b2b6be58aa41d306f0bf18</tree>
  <committer>
    <name>kangax</name>
    <email>juriyzaytsev@ny3-dhcp-94.ithaka.org</email>
  </committer>
</commit>
