Update to work with newer ruby's

Fix for syntax changes in ruby.