title: Ruby code in logstash failing with _rubyexception
body: <p>I would like to get help with the code in ruby filter.</p>
  
  <p>logstash version is 5.0.0 alpha4.</p>
  
  <p>I am testing the code in ruby filter as below but I am getting _rubyexception.</p>
  
  <pre><code>  ruby {
      code =&gt; "
        event['newfield'] = 'test'
      "
    }
  </code></pre>
  
  <p>ruby filter is defined inside filter { }.
  The logstash.log shows as below,</p>
  
  <pre><code>:timestamp=&gt;"2016-08-03T15:26:47.291000+0900", :message=&gt;"Ruby exception occurred: undefined method[]=' for 2016-08-03T06:26:46.829Z test %{message}:LogStash::Event", :level=&gt;:error}
  </code></pre>
  
  <p>I cant find the reason why ruby filter is unable to use event object.
  I appreciate if I could get some help to cope this issue.</p>
  
  <p>Thanks,
  Yu</p>