From 7c653b9bafc2159431c86b628d5279913e7ec74d Mon Sep 17 00:00:00 2001 From: murphy Date: Thu, 22 Jan 2009 14:34:17 +0000 Subject: Fixed a Ruby 1.8 compatibility bug in Groovy Scanner. * Also added jruby19 task (jruby --1.9 mode). --- Rakefile | 4 ++++ lib/coderay/scanners/groovy.rb | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Rakefile b/Rakefile index 780b5d4..0537521 100644 --- a/Rakefile +++ b/Rakefile @@ -45,6 +45,10 @@ task 'jruby' do RUBY.replace 'jruby' end +task 'jruby19' do + RUBY.replace 'jruby --1.9' +end + task 'rubinius' do RUBY.replace 'rbx' end diff --git a/lib/coderay/scanners/groovy.rb b/lib/coderay/scanners/groovy.rb index fd1a34b..9486beb 100644 --- a/lib/coderay/scanners/groovy.rb +++ b/lib/coderay/scanners/groovy.rb @@ -201,7 +201,7 @@ module Scanners elsif (state == :string || state == :multiline_string) && (match = scan(/ \\ (?: #{ESCAPE} | #{UNICODE_ESCAPE} ) /mox)) - if string_delimiter[0] == "'" && !(match == "\\\\" || match == "\\'") + if string_delimiter[0] == ?' && !(match == "\\\\" || match == "\\'") kind = :content else kind = :char -- cgit v1.2.1