updated code ruby.rb