Required syntax changes to support ruby version 1.9

"case" syntax changes and using "node.set[]=" instead of "node[]="