Logstash 2.3 custom array fields

Hi,

When upgrading to 2.3 I have lost the ability to create a custom array field example

filter {
      ruby {
        code =>"
          event['custom'] ||= []
          event['custom] << 'test'  unless event['custom'].include?('test')
          event.tag('test')
        "
      }
}

Output

{
    "@timestamp" => 2016-03-30T23:03:32.537Z,
        **"custom" => [],**
      "@version" => "1",
          "host" => "localhost.localdomain",
       "message" => "test",
          "tags" => [
        [0] "_jsonparsefailure",
        [1] "test"
    ]
}

When I have not used << and created an array and just assigned event['custom'] it works okay

Thanks
Wal