Is it possible to get Date from filename as field

I did not understand what ruby code is trying to do, getting rubyexception error

Below is the logstash log