Logstash 5 beta 1: Ruby exception occurred: undefined method `[]'

ok, I shortly after I posted I found the solution:

So I need to use the following code, then it works:

filter
{
        ruby
        {
            code =>
            "
                m = event.get('message').to_s
                puts m
                event.set('added_field', 'hallo'.to_s)
            "
        }
}