R/S Analysis in Ruby