Skip to content

Commit

Permalink
Ruby 1.9 requires a ; after the : in the short form of case
Browse files Browse the repository at this point in the history
Added newlines instead.
  • Loading branch information
adamhjk committed Mar 11, 2010
1 parent e2d523a commit 1b279ba
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions lib/ohai/plugins/java.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,12 @@
if status == 0
stderr.split("\n").each do |line|
case line
when /java version \"([0-9\.\_]+)\"/: java[:version] = $1
when /^(.+Runtime Environment.*) \(build (.+)\)$/: java[:runtime] = { "name" => $1, "build" => $2 }
when /^(.+ Client VM) \(build (.+)\)$/: java[:hotspot] = { "name" => $1, "build" => $2 }
when /java version \"([0-9\.\_]+)\"/
java[:version] = $1
when /^(.+Runtime Environment.*) \(build (.+)\)$/
java[:runtime] = { "name" => $1, "build" => $2 }
when /^(.+ Client VM) \(build (.+)\)$/
java[:hotspot] = { "name" => $1, "build" => $2 }
end
end

Expand Down

0 comments on commit 1b279ba

Please sign in to comment.