I'm trying to understand if this is an error on Ruby 2.3.1 or 2.3.0.
If the first return is the expected, IMHO this should work on both versions.
Why a minor change and bugfixes produced different results?
I'm currently facing the following problems on Ruby 2.3.1:
#ruby 2.3.0p0
nil[:a] = nil
#returns nil
#ruby 2.3.1p112
nil[:a] = nil
#returns the following error:
NoMethodError: undefined method `[]=' for nil:NilClass
from (irb):1
from ...rbenv/versions/2.3.1/bin/irb:11:in `<main>'