<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -11,6 +11,8 @@ module ActiveRecord
         end
         
         def acts_as_taggable_on(*args)
+          args.flatten! if args
+          args.compact! if args
           for tag_type in args
             tag_type = tag_type.to_s
             self.class_eval do</diff>
      <filename>lib/acts_as_taggable_on/acts_as_taggable_on.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,7 @@
 require File.dirname(__FILE__) + '/../spec_helper'
 
 describe &quot;Acts As Taggable On&quot; do
-  context &quot;Taggable Method Generation&quot; do
+  describe &quot;Taggable Method Generation&quot; do
     before(:each) do
       [TaggableModel, Tag, Tagging, TaggableUser].each(&amp;:delete_all)
       @taggable = TaggableModel.new(:name =&gt; &quot;Bob Jones&quot;)
@@ -80,25 +80,45 @@ describe &quot;Acts As Taggable On&quot; do
   end
   
   describe 'Tagging Contexts' do
-    context '#acts_as_taggable_on' do
-      before(:all) do
-        class Array
-          def freq
-            k=Hash.new(0)
-            self.each {|e| k[e]+=1}
-            k
-          end
+    before(:all) do
+      class Array
+        def freq
+          k=Hash.new(0)
+          self.each {|e| k[e]+=1}
+          k
         end
       end
-      
-      it 'should eliminate duplicate tagging contexts ' do
-        TaggableModel.acts_as_taggable_on(:skills, :skills)
-        TaggableModel.tag_types.freq[:skills].should_not == 3
+    end
+    
+    it 'should eliminate duplicate tagging contexts ' do
+      TaggableModel.acts_as_taggable_on(:skills, :skills)
+      TaggableModel.tag_types.freq[:skills].should_not == 3
+    end
 
-      end
-      after(:all) do
-        class Array; remove_method :freq; end
-      end
+    it &quot;should not contain embedded/nested arrays&quot; do
+      TaggableModel.acts_as_taggable_on([:array], [:array])
+      TaggableModel.tag_types.freq[[:array]].should == 0
+    end
+
+    it &quot;should _flatten_ the content of arrays&quot; do
+      TaggableModel.acts_as_taggable_on([:array], [:array])
+      TaggableModel.tag_types.freq[:array].should == 1
+    end
+
+    it &quot;should not raise an error when passed nil&quot; do
+      lambda {
+        TaggableModel.acts_as_taggable_on()
+      }.should_not raise_error
+    end
+
+    it &quot;should not raise an error when passed [nil]&quot; do
+      lambda {
+        TaggableModel.acts_as_taggable_on([nil])
+      }.should_not raise_error
+    end
+
+    after(:all) do
+      class Array; remove_method :freq; end
     end
   end
   </diff>
      <filename>spec/acts_as_taggable_on/acts_as_taggable_on_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>3723036492fb0f054486c73bbbf2167ee43c2c5c</id>
    </parent>
  </parents>
  <author>
    <name>Michael Bleigh</name>
    <email>michael@intridea.com</email>
  </author>
  <url>http://github.com/mbleigh/acts-as-taggable-on/commit/b9b62566de1861dc111cc3ab96d49a39a2d86457</url>
  <id>b9b62566de1861dc111cc3ab96d49a39a2d86457</id>
  <committed-date>2008-06-12T11:42:36-07:00</committed-date>
  <authored-date>2008-06-12T11:42:36-07:00</authored-date>
  <message>Applied another patch from Sinclair Bain, better handling of various input to acts_as_taggable_on method call. [#18 status:resolved]</message>
  <tree>2ea50a61fbef2609071f4aad509091561e667966</tree>
  <committer>
    <name>Michael Bleigh</name>
    <email>michael@intridea.com</email>
  </committer>
</commit>
