title: *Error in evaluation* while inserting an instance into an Array
body: <p>I have <code>Category</code> class:</p>
  
  <pre><code>  class Category
      include Comparable
  
      attr_reader :name
  
      ##
      # Initialize the Category
      #
      # +name+ is the name of the current Category
      # +context+ is the Liquid:Tag context
      #
      def initialize(name, context)
        @name = name
        @context = context
      end
  
      ##
      # Compare this Category against another Category.
      # Comparison is a comparison between the 2 names.
      #
      def &lt;=&gt;(other)
        return nil unless name.is_a? String
        name &lt;=&gt; other.name
      end
    end
  </code></pre>
  
  <p>I want to create <code>Categories</code> class that takes an array of strings and convert it into an array of <code>Category</code>s. Here is what I wrote:</p>
  
  <pre><code>  class Categories
      ##
      # Initialize the list of categories by passing a list String
      #
      # +category_names+ A list of strings representing a list of categories.
      # +context+ is the Liquid:Tag context
      #
      def initialize(category_names, context)
        category_names = [category_names] unless category_names.is_a? Array
        byebug
        @category_list = category_names.map{|string| Category.new(string, context)}
      end
    end
  </code></pre>
  
  <p>When I'm trying to debug I have the following:</p>
  
  <pre><code>(byebug) category_names.map
  #&lt;Enumerator: ["Heroku"]:map&gt;
  (byebug) cat = Category.new("Heroku", context)                                                                          
  #&lt;Jekyll::Category:0x00000002a85000&gt;
  (byebug) cat.name
  "Heroku"
  (byebug) @category_list = [cat]
  *Error in evaluation*
  </code></pre>
  
  <p>It fails with an error <code>*Error in evaluation*</code>. I cannot figure why. Can someone help me?</p>