When I run

$ ruby -rresolv -e 'ObjectSpace.each_object { |obj| p obj }'

I experience a core dump, but if I run

$ ruby -e 'ObjectSpace.each_object { |obj| p obj }'

It does not happen. I am running

ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-linux]

Can anybody else confirm if this is a bug. I don't have latest ruby to
check against.