Has anyone figured out how to detect errors when malformed input is given to Ruby's ripper library?
ruby-1.9.2-p180 :002 > Ripper.sexp("array[1 2]")
=> [:program, [:@int, "2", [1, 8]]]
ruby-1.9.2-p180 :003 >
I've poked around the sources a little and discovered #compile_error, #warning, #warn, and #yydebug, but it's not yet clear how to get any of these methods to work. No doubt there's some simple answer here.