Permalink
Browse files

fixed chr grabbing for older rb implementations

  • Loading branch information...
1 parent 477fac1 commit 83cdba4e9a3ac60d4bfb384e55f06d51b7dda39c @alexcoplan alexcoplan committed Jul 17, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/rspec/expectations/differ.rb
View
4 lib/rspec/expectations/differ.rb
@@ -75,13 +75,13 @@ def color_diff(diff)
blue = 34
lines = diff.lines.map do |line|
- case line[0]
+ case line[0].chr
when "+"
color(line, green)
when "-"
color(line, red)
when "@"
- line[1] == "@" ? color(line, blue) : line
+ line[1].chr == "@" ? color(line, blue) : line
else
line
end

0 comments on commit 83cdba4

Please sign in to comment.