Chef 10.2 issues saving a role

So, our app plays around, programatically manipulating roles. Recently we’ve
been seeing this, for some instances:

Aug 12 15:37:24 admin crowbar_app[11694]:
/usr/lib/ruby/gems/1.8/gems/chef0.10.2/lib/chef/run_list.rb:78:in ==' /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/json/encoding.rb:68:ininclude?’
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/json/encoding.rb:68:in
encode'/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/json/encoding.rb:18:insend
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/json/encoding.rb:18:in
encode' /usr/lib/ruby/gems/1.8/gems/activesupport-.3.5/lib/active_support/json/encoders/enumerable.rb:11:into_json’
/usr/lib/ruby/gems/1.8/gems/activesupport2.3.5/lib/active_support/json/encoders/enumerable.rb:11:inmap' /usr/lib/ruby/gems/1.8/gems/activesupport-.3.5/lib/active_support/json/encoders/enumerable.rb:11:into_json’
/usr/lib/ruby/gems/1.8/gems/chef-0.10.2/lib/chef/run_list.rb:88:in to_json' /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/json/encoding.rb:70:inencode’

Looking at run_list == ():

def ==(other)
  if other.kind_of?(Chef::RunList)
    other.run_list_items == @run_list_items
  else
    return false unless other.respond_to?(:size) && (other.size ==

@run_list_items.size)
=> other_run_list_items = other.dup

=> other_run_list_items.map! { |item| coerce_to_run_list_item(item) }
other_run_list_items == @run_list_items
end
end

If Other is a String, it seems that it would be duped and then try to apply
map! to it.
If, that is the size of the string happens to exactly be the number of
run_list items…