From: "Carlo E. Prelz" Date: 2013-02-05T22:47:26+09:00 Subject: Re: old syntax? what's going on here Subject: old syntax? what's going on here Date: mar 05 feb 13 10:33:35 +0900 Quoting tamouse mailing lists (tamouse.lists@gmail.com): > I have this in a _spec.rb file: (a gem I inherited at work) > > Open3.expects(:popen3).with do |command| > case part_of_command > when Regexp: command =~ part_of_command > when String: command.include?(part_of_command) > else raise "Can't match that" > end > end Are you sure that code ever worked? From my very worn copy of "Ruby in a nutshell": "A *when* statement's *expression* is separated from *code* by the reserved word *then*, a newline, or a semicolon." That colon should be a semicolon (or *then* or a newline)... Carlo -- * Se la Strada e la sua Virtu' non fossero state messe da parte, * K * Carlo E. Prelz - fluido@fluido.as che bisogno ci sarebbe * di parlare tanto di amore e di rettitudine? (Chuang-Tzu)