Permalink
Browse files

Ruby1.9 compat

* String don't include Enumerable anymore
* rcov (required by metric_fu) produces SyntaxError
  because it uses the old `case` syntax
  • Loading branch information...
1 parent 797d56d commit 7e94e09308791d9d28a31fa4ac185f8119afedf5 @sr sr committed May 8, 2009
Showing with 2 additions and 2 deletions.
  1. +1 −1 Rakefile
  2. +1 −1 test/helper/git_helper.rb
View
@@ -7,7 +7,7 @@ rescue LoadError
end
begin
- require "metric_fu"
+ require "metric_fu" if RUBY_VERSION < "1.9"
rescue LoadError
end
@@ -17,7 +17,7 @@ def create
def commits
Dir.chdir(@path) do
- commits = `git log --pretty=oneline`.collect { |l| l.split(" ").first }
+ commits = `git log --pretty=oneline`.each_line.collect { |l| l.split(" ").first }
commits.inject([]) do |commits, sha1|
format = "---%n:message: >-%n %s%n:timestamp: %ci%n" +
":identifier: %H%n:author: %n :name: %an%n :email: %ae%n"

0 comments on commit 7e94e09

Please sign in to comment.