title: How to write a case statement in Ruby with multiple statements inside a when clause?
body: <p>I tried separating the statements inside the when clauses with commas but it didn't work.</p>
  <blockquote>
  <p>when 1; statement, statement, statement</p>
  <p>when 2; statement, statement, statement</p>
  </blockquote>
  <p>I couldn't find any examples of this online.</p>
  <pre><code>case selection
  when 1
    system &quot;clear&quot;
    view_all_entries
    main_menu
  when 2
    system &quot;clear&quot;
    create_entry
    main_menu
  when 3
    system &quot;clear&quot;
    search_entries
    main_menu
  when 5
    puts &quot;Good bye!&quot;
    exit(0)
  else
    system &quot;clear&quot;
    puts &quot;Sorry, that is not a valid input&quot;
    main_menu
  end
  </code></pre>