ready() vs $(function())

ready() vs $(function())

I understand that ready() will run when DOM is ready:
$(document).ready(function(){
    $('#div').html('Hello');
});

When will this run?:
$(function(){
    $('#div').html('Hello');
});