[Ruby 1.9] Fix failing node_attrib_model test

Ruby 1.8 and 1.9 throws different errors in this case, so handle it
accordingly so that tests pass in both cases.